summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Friis <peavey@placid.dk>2008-05-06 19:23:49 +0000
committerDennis Friis <peavey@placid.dk>2008-05-06 19:23:49 +0000
commit1add0d135afdae058c1dee18728a5ecbd8dd8433 (patch)
tree1c947c72a23f5e4196ae6016d3a56ac8911df926
parent396c966cd2b3af2dbdb5b157e9ebb2e576b677b0 (diff)
downloadmana-1add0d135afdae058c1dee18728a5ecbd8dd8433.tar.gz
mana-1add0d135afdae058c1dee18728a5ecbd8dd8433.tar.bz2
mana-1add0d135afdae058c1dee18728a5ecbd8dd8433.tar.xz
mana-1add0d135afdae058c1dee18728a5ecbd8dd8433.zip
Dont allow dragging of empty placeholders.
-rw-r--r--ChangeLog5
-rw-r--r--src/gui/itemshortcutcontainer.cpp2
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index dcd84ffa..0b716d59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-28 Dennis Friis <peavey@placid.dk>
+
+ * src/gui/itemshortcutcontainer.cpp: Dont allow dragging of empty
+ placeholders.
+
2008-04-29 Bjørn Lindeijer <bjorn@lindeijer.nl>
* 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)
{