summaryrefslogtreecommitdiff
path: root/src/gui/widgets/itemcontainer.cpp
diff options
context:
space:
mode:
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;
}