Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter@walter-laptop.(none)>2010-01-28 02:44:24 (GMT)
committer Walter Bender <walter@walter-laptop.(none)>2010-01-28 02:44:24 (GMT)
commit6dfc443dde4d4c6845cfe1d57412786423b62737 (patch)
treeaa14d242a36ade7264285df3f3a771b3a3b8196d
parentb3dc9eee00bf73681b24b0652c795dae13339a11 (diff)
found the last? selection bug
-rw-r--r--tawindow.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/tawindow.py b/tawindow.py
index d68147e..e7cee31 100644
--- a/tawindow.py
+++ b/tawindow.py
@@ -390,7 +390,7 @@ class TurtleArtWindow():
if w < len(PALETTES)*(SELECTOR_WIDTH+5) + 5:
w = len(PALETTES)*(SELECTOR_WIDTH+5) + 5
self.palette_sprs[n] = Sprite(self.sprite_list, 0, 0,
- svg_str_to_pixbuf(svg.palette(w, self.width, PALETTE_HEIGHT)))
+ svg_str_to_pixbuf(svg.palette(w, w, PALETTE_HEIGHT)))
self.palette_sprs[n].type = 'category'
self.palette_sprs[n].set_layer(CATEGORY_LAYER)
else:
@@ -750,12 +750,10 @@ class TurtleArtWindow():
if spr is None:
return True
self.selected_spr = spr
- if hasattr(spr,'type'):
- print "clicked on %s" % (spr.type)
+
# From the sprite at x, y, look for a corresponding block
blk = self.block_list.spr_to_block(spr)
if blk is not None:
- print "clicked on %s (type %s)" % (blk.name, blk.type)
if blk.type == 'block':
self.selected_blk = blk
self._block_pressed(mask, x, y, blk)
@@ -771,7 +769,6 @@ class TurtleArtWindow():
# Next, look for a turtle
t = self.turtle_list.spr_to_turtle(spr)
if t is not None:
- print "clicked on turtle %d" % (self.turtle_list.list.index(t))
self.selected_turtle = t
self._turtle_pressed(x, y)
return True
@@ -783,6 +780,8 @@ class TurtleArtWindow():
return True
elif spr.type == 'selector':
self._select_category(spr)
+ elif spr.type == 'category':
+ pass
"""
Block pressed