changeset 38:bd1e3b743518

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 799fc37fec6d
children 8b3890f17f94
files src/parpg/systems/container.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/parpg/systems/container.py	Sun Jul 31 23:48:54 2011 +0200
+++ b/src/parpg/systems/container.py	Mon Aug 01 08:44:31 2011 +0200
@@ -48,7 +48,10 @@
                         containable.current_container = new_container
                         old_containable = new_container.children.pop(new_slot)
                         old_containable.current_container = drag_container
-                        drag_container.children = [old_containable]
+                        drag_container.children.append(old_containable)
+                    else:
+                        new_container.append(containable)
+                        containable.current_container = new_container
                 else:
                     for listener in self.on_bulk_to_big:
                         listener(bulk, new_container.max_bulk)