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.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py
index 1bc7ab8..2853bbd 100644
--- a/TurtleArt/tawindow.py
+++ b/TurtleArt/tawindow.py
@@ -782,6 +782,11 @@ class TurtleArtWindow():
elif blk.name in MACROS:
self._new_macro(blk.name, x + 20, y + 20)
else:
+ # You can only have one instance of some blocks
+ if blk.name in ['start', 'hat1', 'hat2']:
+ if self.block_list.get_block_of_same_type_and_name(
+ 'block', blk.name) is not None:
+ return True
blk.highlight()
self._new_block(blk.name, x, y)
blk.unhighlight()