Mercurial > parpg-source
comparison gui/inventorygui.py @ 142:c28e29056218
Removed source_container value from data_drag.
author | KarstenBock@gmx.net |
---|---|
date | Sun, 09 Oct 2011 18:22:48 +0200 |
parents | 9e86c37f5506 |
children | 86b9b181ad1c |
comparison
equal
deleted
inserted
replaced
141:658e06a20fa5 | 142:c28e29056218 |
---|---|
197 if (drag_item != None): | 197 if (drag_item != None): |
198 if isinstance(drag_item, General): | 198 if isinstance(drag_item, General): |
199 drag_item = drag_item.containable | 199 drag_item = drag_item.containable |
200 # get the image of the widget | 200 # get the image of the widget |
201 image = drag_widget.image | 201 image = drag_widget.image |
202 self.setDragData(drag_item, image, image, self.container) | 202 self.setDragData(drag_item, image, image) |
203 container.take_item(self.container, drag_item.slot) | 203 container.take_item(self.container, drag_item.slot) |
204 | 204 |
205 # after dragging the 'item', set the widgets' images | 205 # after dragging the 'item', set the widgets' images |
206 # so that it has it's default 'empty' images | 206 # so that it has it's default 'empty' images |
207 drag_widget.item = None | 207 drag_widget.item = None |
227 ) | 227 ) |
228 | 228 |
229 #if there was no item the stop dragging and reset cursor | 229 #if there was no item the stop dragging and reset cursor |
230 if replace_item: | 230 if replace_item: |
231 image = drop_widget.image | 231 image = drop_widget.image |
232 self.setDragData(replace_item, image, image, self.container) | 232 self.setDragData(replace_item, image, image) |
233 else: | 233 else: |
234 data_drag.dragging = False | 234 data_drag.dragging = False |
235 #reset the mouse cursor to the normal cursor | 235 #reset the mouse cursor to the normal cursor |
236 self.controller.resetMouseCursor() | 236 self.controller.resetMouseCursor() |
237 drop_widget.item = drag_item.entity | 237 drop_widget.item = drag_item.entity |