Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/block.py
diff options
context:
space:
mode:
Diffstat (limited to 'block.py')
-rw-r--r--block.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/block.py b/block.py
index 4e2685e..9a28cbe 100644
--- a/block.py
+++ b/block.py
@@ -212,9 +212,12 @@ class Block:
print ">>>>> I don't know how to create a %s block" % (self.name)
def _set_colors(self, svg):
- for p in range(len(PALETTES)):
- if self.name in PALETTES[p]:
- self.colors = COLORS[p]
+ if BOX_COLORS.has_key(self.name):
+ self.colors = BOX_COLORS[self.name]
+ else:
+ for p in range(len(PALETTES)):
+ if self.name in PALETTES[p]:
+ self.colors = COLORS[p]
self.svg.set_colors(self.colors)
def _make_basic_style(self, e, svg):