Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt
diff options
context:
space:
mode:
Diffstat (limited to 'TurtleArt')
-rw-r--r--TurtleArt/tablock.py4
-rw-r--r--TurtleArt/tawindow.py8
2 files changed, 10 insertions, 2 deletions
diff --git a/TurtleArt/tablock.py b/TurtleArt/tablock.py
index effe410..7e48d43 100644
--- a/TurtleArt/tablock.py
+++ b/TurtleArt/tablock.py
@@ -587,8 +587,8 @@ class Block:
else:
self.block_methods[k](svg)
return
- error_output('block type not found %s' % (self.name))
- self.block_methods['basic-style'](svg)
+ error_output('ERROR: block type not found %s' % (self.name))
+ self.block_methods['blank-style'](svg)
def _set_colors(self, svg):
if self._custom_colors:
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?