diff options
author | Dennis Friis <peavey@placid.dk> | 2008-04-24 20:49:30 +0000 |
---|---|---|
committer | Dennis Friis <peavey@placid.dk> | 2008-04-24 20:49:30 +0000 |
commit | 3676b78c6e6e8089c0b6e38c0983bd99ea22e756 (patch) | |
tree | 30dadd8b4e00f70245279eeee04c71347f7dbc60 /src/gui/itemcontainer.cpp | |
parent | 8c0964dbb59a10c47d2040686b03201ab5688092 (diff) | |
download | mana-3676b78c6e6e8089c0b6e38c0983bd99ea22e756.tar.gz mana-3676b78c6e6e8089c0b6e38c0983bd99ea22e756.tar.bz2 mana-3676b78c6e6e8089c0b6e38c0983bd99ea22e756.tar.xz mana-3676b78c6e6e8089c0b6e38c0983bd99ea22e756.zip |
Make shortcut container ID based instead of slot based. Fixes items shifting around often causing equipment to be lost.
Diffstat (limited to 'src/gui/itemcontainer.cpp')
-rw-r--r-- | src/gui/itemcontainer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp index ad0674f4..a6348d01 100644 --- a/src/gui/itemcontainer.cpp +++ b/src/gui/itemcontainer.cpp @@ -197,7 +197,7 @@ ItemContainer::mousePressed(gcn::MouseEvent &event) int my = event.getY(); int index = mx / gridWidth + ((my / gridHeight) * columns) + 2; - itemShortcut->setItemSelected(NULL); + itemShortcut->setItemSelected(-1); // Fix for old server, it should be: if (index >= mMaxItems) if (index > mMaxItems + 1) { @@ -208,7 +208,7 @@ ItemContainer::mousePressed(gcn::MouseEvent &event) setSelectedItem(item); if (!item->isEquipment()) { - itemShortcut->setItemSelected(item); + itemShortcut->setItemSelected(item->getId()); } } } |