Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2010-11-17 14:16:42 (GMT)
committer Walter Bender <walter@sugarlabs.org>2010-11-17 14:16:42 (GMT)
commit77ba3d4004e5cff601bad8b0d246275b4efc7a89 (patch)
tree043d0f8d7d817acdfd7d1be03004f85e2ba77c24
parentdb927b97d91eec43cb53dec377db130a6aa86ea7 (diff)
fixed regression with reloading variable argument Python blocks
-rw-r--r--TurtleArt/tawindow.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py
index 80c9e1b..65176f8 100644
--- a/TurtleArt/tawindow.py
+++ b/TurtleArt/tawindow.py
@@ -2338,12 +2338,7 @@ class TurtleArtWindow():
'block', values, self.block_scale)
# Some blocks get transformed.
- if btype == 'string' and blk.spr is not None:
- blk.spr.set_label(blk.values[0].replace('\n', RETURN))
- elif btype == 'start': # block size is saved in start block
- if value is not None:
- self.block_scale = value
- elif btype in BASIC_STYLE_VAR_ARG and value is not None:
+ if btype in BASIC_STYLE_VAR_ARG and value is not None:
if self.running_sugar:
self.load_python_code_from_journal(datastore.get(value), blk)
else:
@@ -2353,6 +2348,11 @@ class TurtleArtWindow():
self.selected_blk = None
self.myblock[self.block_list.list.index(blk)] = self.python_code
self.set_userdefined(blk)
+ if btype == 'string' and blk.spr is not None:
+ blk.spr.set_label(blk.values[0].replace('\n', RETURN))
+ elif btype == 'start': # block size is saved in start block
+ if value is not None:
+ self.block_scale = value
elif btype in EXPANDABLE or btype in EXPANDABLE_BLOCKS or \
btype in EXPANDABLE_ARGS or btype == 'nop':
if btype == 'vspace' or btype in EXPANDABLE_BLOCKS: