From b2894baed1975a61f23c7e2e07999c668976c0b9 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Tue, 23 Jul 2013 15:57:16 +0000 Subject: add restore_state method used by some plugins, confusions --- diff --git a/TurtleArt/talogo.py b/TurtleArt/talogo.py index 646b028..7aac4ce 100644 --- a/TurtleArt/talogo.py +++ b/TurtleArt/talogo.py @@ -608,6 +608,7 @@ class LogoCode: self.hidden_turtle = None self.start_time = time() self.clear_value_blocks() + self.tw.activity.restore_state() def clear_value_blocks(self): if not hasattr(self, 'value_blocks_to_update'): diff --git a/TurtleArtActivity.py b/TurtleArtActivity.py index c8f9755..3274dfc 100644 --- a/TurtleArtActivity.py +++ b/TurtleArtActivity.py @@ -1580,3 +1580,7 @@ in order to use the plugin.')) alert.props.msg = msg self.add_alert(alert) alert.show() + + def restore_state(self): + ''' Anything that needs restoring after a clear screen can go here ''' + pass diff --git a/turtleblocks.py b/turtleblocks.py index 5d5808f..98d89d9 100755 --- a/turtleblocks.py +++ b/turtleblocks.py @@ -736,6 +736,10 @@ Would you like to save before quitting?')) else: return os.path.abspath(dirname) + def restore_state(self): + ''' Anything that needs restoring after a clear screen can go here ''' + pass + if __name__ == '__main__': TurtleMain() -- cgit v0.9.1