changeset 127:d98654287317

Fix abode clearing bug.
author Simon Cross <hodgestar@gmail.com>
date Wed, 02 Sep 2009 21:31:24 +0000
parents 73e13216d7bb
children c5f07479592e
files gamelib/gameboard.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/gameboard.py	Wed Sep 02 21:29:25 2009 +0000
+++ b/gamelib/gameboard.py	Wed Sep 02 21:31:24 2009 +0000
@@ -287,6 +287,8 @@
                 button.connect(gui.CLICK, select_occupant, place, button)
 
                 old_abode = self.animal_to_place.abode
+                if old_abode is not None:
+                    old_abode.clear_occupant()
                 if id(old_abode) in place_button_map:
                     old_button = place_button_map[id(old_abode)]
                     old_button.value = icons.EMPTY_NEST_ICON