diff options
author | Walter Bender <walter@sugarlabs.org> | 2013-07-23 15:57:16 (GMT) |
---|---|---|
committer | Walter Bender <walter@sugarlabs.org> | 2013-07-23 15:57:16 (GMT) |
commit | b2894baed1975a61f23c7e2e07999c668976c0b9 (patch) | |
tree | bb25fba5e5ffe57742a7e060ffae062a9b778417 | |
parent | 0ee623d23243cc9378f2fac319c5462fd972ad3b (diff) |
add restore_state method used by some plugins, confusions
-rw-r--r-- | TurtleArt/talogo.py | 1 | ||||
-rw-r--r-- | TurtleArtActivity.py | 4 | ||||
-rwxr-xr-x | turtleblocks.py | 4 |
3 files changed, 9 insertions, 0 deletions
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() |