Mercurial > parpg-core
diff src/parpg/gui/hud.py @ 156:04de7f38429a
The stopActions method in the Hud class now drops the item that is currently dragged onto the map.
author | KarstenBock@gmx.net |
---|---|
date | Fri, 07 Oct 2011 14:16:21 +0200 |
parents | 3fc7cfa80771 |
children | d1f9652d0651 |
line wrap: on
line diff
--- a/src/parpg/gui/hud.py Fri Oct 07 14:15:06 2011 +0200 +++ b/src/parpg/gui/hud.py Fri Oct 07 14:16:21 2011 +0200 @@ -28,7 +28,8 @@ from parpg.gui import drag_drop_data as data_drag from parpg.gui.inventorygui import CharacterGUI from actionsbox import ActionsBox -from parpg.components import container +from parpg.objects.action import DropItemAction + logger = logging.getLogger('hud') class Hud(object): """Main Hud class""" @@ -304,9 +305,10 @@ interfere with current running ones.""" #Reset dragging - move item back to its old container if data_drag.dragging: - data_drag.source_container.placeItem(data_drag.dragged_item) + drag_item = data_drag.dragged_item data_drag.dragging = False data_drag.dragged_item = None + DropItemAction(self.controller, drag_item).execute() if self.inventory: self.inventory.closeInventory()