diff options
Diffstat (limited to 'plugins/turtle_blocks_extras/turtle_blocks_extras.py')
-rw-r--r-- | plugins/turtle_blocks_extras/turtle_blocks_extras.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/turtle_blocks_extras/turtle_blocks_extras.py b/plugins/turtle_blocks_extras/turtle_blocks_extras.py index a272ec8..8f5a94d 100644 --- a/plugins/turtle_blocks_extras/turtle_blocks_extras.py +++ b/plugins/turtle_blocks_extras/turtle_blocks_extras.py @@ -957,7 +957,8 @@ Journal objects')) ''' User-defined macros are saved as a json-encoded file; these get loaded into a palette on startup ''' - if os.path.exists(self.tw.macros_path): + if hasattr(self.tw, 'macros_path') and \ + os.path.exists(self.tw.macros_path): files = glob.glob(os.path.join(self.tw.macros_path, '*.tb')) debug_output('making myblocks palette', self.tw.running_sugar) if len(files) > 0: @@ -1203,7 +1204,6 @@ Journal objects')) def _prim_save_svg(self, name): """ Save SVG to file """ - self.tw.canvas.svg_close() self.tw.save_as_image(name, svg=True) def _prim_speak(self, text): @@ -1519,6 +1519,7 @@ Journal objects')) (1) translate the label name into the internal block name; (2) 'dock' the block onto a stack where appropriate; and (3) disassociate the new block from the mouse. """ + x, y = self.tw.turtles.turtle_to_screen_coordinates((x, y)) for name in block_names: # Translate label name into block/prim name. if blkname in block_names[name]: |