# HG changeset patch # User KarstenBock@gmx.net # Date 1316777417 -7200 # Node ID d456334d09c0ac58385a7dbc890b032869416ffb # Parent f3ace79da781b6a3031d2974e5ceb5c5fd9f48c1 Fixed bugs in the container functions. diff -r f3ace79da781 -r d456334d09c0 src/parpg/components/container.py --- a/src/parpg/components/container.py Fri Sep 23 12:58:32 2011 +0200 +++ b/src/parpg/components/container.py Fri Sep 23 13:30:17 2011 +0200 @@ -70,8 +70,8 @@ if len(container.children) >= (slot_or_type + 1): return container.children[slot_or_type] else: - for item in container.children: - if child and child.type == slot_or_type: + for child in container.children: + if child and child.item_type == slot_or_type: return child return None @@ -85,8 +85,8 @@ item.container = None item.slot = -1 else: - for item in container.children: - if child and child.type == slot_or_type: + for child in container.children: + if child and child.item_type == slot_or_type: container.children[child.slot] = None child.container = None child.slot = -1