diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-10-30 00:11:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-10-30 00:11:35 +0300 |
commit | 1b653c7c1a3e6c5d7b2739f881ea6b11ca46cd3b (patch) | |
tree | de98074d774b203053c4215a49764837a3b007ed /src/gui/widgets/itemcontainer.cpp | |
parent | 598de45a1e77e5f10c69694f607941336163673f (diff) | |
download | manaverse-1b653c7c1a3e6c5d7b2739f881ea6b11ca46cd3b.tar.gz manaverse-1b653c7c1a3e6c5d7b2739f881ea6b11ca46cd3b.tar.bz2 manaverse-1b653c7c1a3e6c5d7b2739f881ea6b11ca46cd3b.tar.xz manaverse-1b653c7c1a3e6c5d7b2739f881ea6b11ca46cd3b.zip |
Allow add item by drag&drop into npc inventory to exact position.
Diffstat (limited to 'src/gui/widgets/itemcontainer.cpp')
-rw-r--r-- | src/gui/widgets/itemcontainer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index 8fc8b09e4..fec14b814 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -631,8 +631,9 @@ void ItemContainer::mouseReleased(MouseEvent &event) inventory = PlayerInfo::getInventory(); if (inventory) { - mInventory->addVirtualItem(inventory->getItem( - dragDrop.getTag())); + mInventory->addVirtualItem( + inventory->getItem(dragDrop.getTag()), + getSlotIndex(event.getX(), event.getY())); } return; } |