From a10bc4ff15da53ab43c016976b4b7138b158ea91 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Wed, 18 Jan 2012 13:15:39 +0000 Subject: reworking of activity-specific metadata --- (limited to 'TurtleArt/tawindow.py') diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py index b6dc787..4634ccc 100644 --- a/TurtleArt/tawindow.py +++ b/TurtleArt/tawindow.py @@ -1371,11 +1371,14 @@ class TurtleArtWindow(): newblk.connections[i + 1] = argblk self.drag_group = find_group(newblk) self.block_operation = 'new' + debug_output(newblk.name, True) if len(newblk.spr.labels) > 0 and newblk.spr.labels[0] is not None \ and newblk.name not in ['', 'number', 'string']: - if newblk.spr.labels[0] not in self.used_block_list: - if len(self.used_block_list) > 0: - self.used_block_list.append(', ') + if len(self.used_block_list) > 0: + self.used_block_list.append(', ') + if newblk.name in special_names: + self.used_block_list.append(special_names[newblk.name]) + elif newblk.spr.labels[0] not in self.used_block_list: self.used_block_list.append(newblk.spr.labels[0]) def _new_macro(self, name, x, y): @@ -2870,9 +2873,11 @@ class TurtleArtWindow(): blk.connections = 'check' if self.running_sugar and len(blk.spr.labels) > 0 and \ blk.name not in ['', ' ', 'number', 'string']: - if blk.spr.labels[0] not in self.used_block_list: - if len(self.used_block_list) > 0: - self.used_block_list.append(', ') + if len(self.used_block_list) > 0: + self.used_block_list.append(', ') + if blk.name in special_names: + self.used_block_list.append(special_names[blk.name]) + elif blk.spr.labels[0] not in self.used_block_list: self.used_block_list.append(blk.spr.labels[0]) return blk -- cgit v0.9.1