Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt/tawindow.py
diff options
context:
space:
mode:
Diffstat (limited to 'TurtleArt/tawindow.py')
-rw-r--r--TurtleArt/tawindow.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py
index 8bf948a..d187580 100644
--- a/TurtleArt/tawindow.py
+++ b/TurtleArt/tawindow.py
@@ -3346,6 +3346,14 @@ class TurtleArtWindow():
b[3] + self.canvas.cy + offset,
'block', values, self.block_scale)
+ # If it was an unknown block type, we need to match the number
+ # of dock items. TODO: Try to infer the dock type from connections
+ if len(b[4]) > len(blk.docks):
+ debug_output('dock mismatch %d > %d' % (len(b[4]), len(blk.docks)),
+ self.running_sugar)
+ for i in range(len(b[4]) - len(blk.docks)):
+ blk.docks.append(['unavailable', True, 0, 0])
+
# Some blocks get transformed.
if btype in block_styles['basic-style-var-arg'] and value is not None:
# Is there code stored in this userdefined block?