# HG changeset patch # User KarstenBock@gmx.net # Date 1317989781 -7200 # Node ID f7543a85c2ea9a70886de7bb98207610b22d52ee # Parent 452bbc3d915d7475530f63b49f37dd242150b072 The stopActions method in the Hud class now drops the item that is currently dragged onto the map. diff -r 452bbc3d915d -r f7543a85c2ea gui/hud.py --- a/gui/hud.py Fri Oct 07 14:15:06 2011 +0200 +++ b/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()