Mercurial > parpg-source
comparison systems/container.py @ 16:5c587a0d9ad7
Added clause when the containable should just be added to end of the list
author | KarstenBock@gmx.net |
---|---|
date | Mon, 01 Aug 2011 08:44:31 +0200 |
parents | a9019d0ac5f8 |
children | 702ee8e475df |
comparison
equal
deleted
inserted
replaced
15:9ffcb493a0f4 | 16:5c587a0d9ad7 |
---|---|
46 if new_slot >= 0: | 46 if new_slot >= 0: |
47 new_container.children.insert(new_slot + 1, containable) | 47 new_container.children.insert(new_slot + 1, containable) |
48 containable.current_container = new_container | 48 containable.current_container = new_container |
49 old_containable = new_container.children.pop(new_slot) | 49 old_containable = new_container.children.pop(new_slot) |
50 old_containable.current_container = drag_container | 50 old_containable.current_container = drag_container |
51 drag_container.children = [old_containable] | 51 drag_container.children.append(old_containable) |
52 else: | |
53 new_container.append(containable) | |
54 containable.current_container = new_container | |
52 else: | 55 else: |
53 for listener in self.on_bulk_to_big: | 56 for listener in self.on_bulk_to_big: |
54 listener(bulk, new_container.max_bulk) | 57 listener(bulk, new_container.max_bulk) |
55 | 58 |
56 | 59 |