diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-03-11 11:34:43 -0600 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-03-11 15:00:36 -0600 |
commit | a34d8a88df817371823e8e036b3a9208f8d5ba85 (patch) | |
tree | 16d15ba60685c9afe5cc26c59c41baff1efcf0e4 /src/gui/itemshortcutcontainer.cpp | |
parent | 9935a143cc9c2cd672889965b5db647921cf0210 (diff) | |
download | mana-a34d8a88df817371823e8e036b3a9208f8d5ba85.tar.gz mana-a34d8a88df817371823e8e036b3a9208f8d5ba85.tar.bz2 mana-a34d8a88df817371823e8e036b3a9208f8d5ba85.tar.xz mana-a34d8a88df817371823e8e036b3a9208f8d5ba85.zip |
Don't move stuff from inventory when not visible
Diffstat (limited to 'src/gui/itemshortcutcontainer.cpp')
-rw-r--r-- | src/gui/itemshortcutcontainer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/itemshortcutcontainer.cpp b/src/gui/itemshortcutcontainer.cpp index abe81537..cb709227 100644 --- a/src/gui/itemshortcutcontainer.cpp +++ b/src/gui/itemshortcutcontainer.cpp @@ -20,6 +20,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "inventorywindow.h" #include "itemshortcutcontainer.h" #include "itempopup.h" #include "viewport.h" @@ -168,9 +169,8 @@ void ItemShortcutContainer::mousePressed(gcn::MouseEvent &event) if (event.getButton() == gcn::MouseEvent::LEFT) { - // Stores the selected item if theirs one. - if (itemShortcut->isItemSelected()) + if (itemShortcut->isItemSelected() && inventoryWindow->isVisible()) { itemShortcut->setItem(index); itemShortcut->setItemSelected(-1); @@ -231,7 +231,7 @@ void ItemShortcutContainer::mouseMoved(gcn::MouseEvent &event) Item *item = player_node->getInventory()->findItem(itemId); - if (item) + if (item && inventoryWindow->isVisible()) { mItemPopup->setItem(item->getInfo()); mItemPopup->setOpaque(false); |