From 1add0d135afdae058c1dee18728a5ecbd8dd8433 Mon Sep 17 00:00:00 2001 From: Dennis Friis Date: Tue, 6 May 2008 19:23:49 +0000 Subject: Dont allow dragging of empty placeholders. --- ChangeLog | 5 +++++ src/gui/itemshortcutcontainer.cpp | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index dcd84ffa..0b716d59 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-04-28 Dennis Friis + + * src/gui/itemshortcutcontainer.cpp: Dont allow dragging of empty + placeholders. + 2008-04-29 Bjørn Lindeijer * src/game.cpp, src/gui/chat.h, src/gui/chat.cpp: Fixed issue with diff --git a/src/gui/itemshortcutcontainer.cpp b/src/gui/itemshortcutcontainer.cpp index 50f45dee..b15c8983 100644 --- a/src/gui/itemshortcutcontainer.cpp +++ b/src/gui/itemshortcutcontainer.cpp @@ -151,6 +151,8 @@ ItemShortcutContainer::mouseDragged(gcn::MouseEvent &event) if (index == -1) { return; } + if (itemShortcut->getItem(index) < 0) + return; Item *item = player_node->searchForItem(itemShortcut->getItem(index)); if (item) { -- cgit v1.2.3-70-g09d2