comparison gui/containergui.py @ 142:c28e29056218

Removed source_container value from data_drag.
author KarstenBock@gmx.net
date Sun, 09 Oct 2011 18:22:48 +0200
parents ef24560eb920
children
comparison
equal deleted inserted replaced
141:658e06a20fa5 142:c28e29056218
65 # get the item that the widget is 'storing' 65 # get the item that the widget is 'storing'
66 data_drag.dragged_item = drag_widget.item 66 data_drag.dragged_item = drag_widget.item
67 # get the up and down images of the widget 67 # get the up and down images of the widget
68 up_image = drag_widget.up_image 68 up_image = drag_widget.up_image
69 down_image = drag_widget.down_image 69 down_image = drag_widget.down_image
70 self.setDragData(drag_widget.item, down_image, up_image, 70 self.setDragData(drag_widget.item, down_image, up_image)
71 self.container)
72 container.take_item(self.container, drag_widget.item.slot) 71 container.take_item(self.container, drag_widget.item.slot)
73 72
74 # after dragging the 'item', set the widgets' images 73 # after dragging the 'item', set the widgets' images
75 # so that it has it's default 'empty' images 74 # so that it has it's default 'empty' images
76 drag_widget.item = None 75 drag_widget.item = None
97 96
98 #if there was no item the stop dragging and reset cursor 97 #if there was no item the stop dragging and reset cursor
99 if replace_item: 98 if replace_item:
100 up_image = drop_widget.up_image 99 up_image = drop_widget.up_image
101 down_image = drop_widget.down_image 100 down_image = drop_widget.down_image
102 self.setDragData(replace_item, down_image, up_image, 101 self.setDragData(replace_item, down_image, up_image)
103 self.container)
104 else: 102 else:
105 data_drag.dragging = False 103 data_drag.dragging = False
106 #reset the mouse cursor to the normal cursor 104 #reset the mouse cursor to the normal cursor
107 self.controller.resetMouseCursor() 105 self.controller.resetMouseCursor()
108 drop_widget.item = drag_item 106 drop_widget.item = drag_item