summaryrefslogtreecommitdiff
path: root/src/gui/widgets/itemcontainer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-30 00:11:35 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-30 00:11:35 +0300
commit1b653c7c1a3e6c5d7b2739f881ea6b11ca46cd3b (patch)
treede98074d774b203053c4215a49764837a3b007ed /src/gui/widgets/itemcontainer.cpp
parent598de45a1e77e5f10c69694f607941336163673f (diff)
downloadmanaplus-1b653c7c1a3e6c5d7b2739f881ea6b11ca46cd3b.tar.gz
manaplus-1b653c7c1a3e6c5d7b2739f881ea6b11ca46cd3b.tar.bz2
manaplus-1b653c7c1a3e6c5d7b2739f881ea6b11ca46cd3b.tar.xz
manaplus-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.cpp5
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;
}