# HG changeset patch # User Simon Cross # Date 1252017860 0 # Node ID 946f09ed37cd6522bad6fb4e922e0dbaba1896c6 # Parent 1014bfcddc4c5132805c4c89cc47da76d31ed764 Make equipment dialog close after selecting an item to sell. diff -r 1014bfcddc4c -r 946f09ed37cd gamelib/gameboard.py --- a/gamelib/gameboard.py Thu Sep 03 22:42:22 2009 +0000 +++ b/gamelib/gameboard.py Thu Sep 03 22:44:20 2009 +0000 @@ -328,6 +328,7 @@ tbl.td(close_button) self.disp.open(tbl) + return tbl def open_building_dialog(self, building): """Create dialog for manipulating the contents of a building.""" @@ -453,7 +454,7 @@ """Select item of equipment.""" self.add_cash(item.sell_price()) chicken.unequip(item) - self.disp.close(tbl) + self.disp.close(dialog) kwargs = { 'style': { 'padding_left': 10, 'padding_bottom': 10 }} @@ -466,7 +467,7 @@ button.connect(gui.CLICK, sell_item, item, button) tbl.td(button, align=1, **kwargs) - self.open_dialog(tbl) + dialog = self.open_dialog(tbl) def event(self, e): if e.type == KEYDOWN: