diff options
Diffstat (limited to 'TurtleArt/tawindow.py')
-rw-r--r-- | TurtleArt/tawindow.py | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py index dcb5fa5..1d87c9b 100644 --- a/TurtleArt/tawindow.py +++ b/TurtleArt/tawindow.py @@ -2045,10 +2045,14 @@ class TurtleArtWindow(): if defaults is None: defaults = default_values[name] newblk = Block(self.block_list, self.sprite_list, name, x_pos, - y_pos, 'block', defaults, self.block_scale) + y_pos, 'block', defaults) + if self.block_scale != BLOCK_SCALE[3]: + newblk.rescale(self.block_scale) else: newblk = Block(self.block_list, self.sprite_list, name, x_pos, - y_pos, 'block', [], self.block_scale) + y_pos, 'block', []) + if self.block_scale != BLOCK_SCALE[3]: + newblk.rescale(self.block_scale) # Add a 'skin' to some blocks if name in PYTHON_SKIN: @@ -2094,12 +2098,14 @@ class TurtleArtWindow(): if argname is not None: if argname in content_blocks: argblk = Block(self.block_list, self.sprite_list, - argname, 0, 0, 'block', [argvalue], - self.block_scale) + argname, 0, 0, 'block', [argvalue]) + if self.block_scale != BLOCK_SCALE[3]: + argblk.rescale(self.block_scale) else: argblk = Block(self.block_list, self.sprite_list, - argname, 0, 0, 'block', [], - self.block_scale) + argname, 0, 0, 'block', []) + if self.block_scale != BLOCK_SCALE[3]: + argblk.rescale(self.block_scale) argdock = argblk.docks[0] nx = sx + dock[2] - argdock[2] ny = sy + dock[3] - argdock[3] @@ -2815,7 +2821,9 @@ class TurtleArtWindow(): argvalue = default_values[blk.name][ len(default_values[blk.name]) - 1] argblk = Block(self.block_list, self.sprite_list, argname, - 0, 0, 'block', [argvalue], self.block_scale) + 0, 0, 'block', [argvalue]) + if self.block_scale != BLOCK_SCALE[3]: + argblk.rescale(self.block_scale) argdock = argblk.docks[0] (bx, by) = blk.spr.get_xy() nx = bx + blk.docks[n - 1][2] - argdock[2] @@ -3918,9 +3926,9 @@ class TurtleArtWindow(): btype = OLD_NAMES[btype] blk = Block(self.block_list, self.sprite_list, btype, - b[2] + offset, - b[3] + offset, - 'block', values, self.block_scale) + b[2] + offset, b[3] + offset, 'block', values) + if self.block_scale != BLOCK_SCALE[3]: + blk.rescale(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 |