# HG changeset patch # User Simon Cross # Date 1316807642 -7200 # Node ID a2648295b7cf48a9b0e2f8c8b03af4433b04e41e # Parent b2e0f1267282a021009219c89c8aed7c2514e531 Only stop test if we were just testing (otherwise the level gets cleared). diff -r b2e0f1267282 -r a2648295b7cf mamba/habitats/editor.py --- a/mamba/habitats/editor.py Wed Sep 21 14:19:45 2011 +0200 +++ b/mamba/habitats/editor.py Fri Sep 23 21:54:02 2011 +0200 @@ -402,6 +402,7 @@ return True def change_toolbar(self, ev, widget, new_mode): + old_mode = self.mode if new_mode == 'Test': try: self.level.validate_level() @@ -416,7 +417,7 @@ self.setup_toolbar() if self.mode == 'Test': self.edit_widget.start_test() - else: + elif old_mode == 'Test': self.edit_widget.stop_test() return True