Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/abacus_window.py
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2010-06-29 18:55:45 (GMT)
committer Walter Bender <walter@sugarlabs.org>2010-06-29 18:55:45 (GMT)
commitfaafbc3e015d79308b3fb3ec3b28368578ec51d0 (patch)
tree3d07c88614609c2188773cc81522a6e44b5ba6a5 /abacus_window.py
parenta2acd5f1cf23e9a2905d89ac569ce5cc4ef5c2c1 (diff)
fixed problem with moving multiple beads on Decimal abacus
Diffstat (limited to 'abacus_window.py')
-rw-r--r--abacus_window.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/abacus_window.py b/abacus_window.py
index 9512e73..d899ab2 100644
--- a/abacus_window.py
+++ b/abacus_window.py
@@ -711,7 +711,8 @@ class AbacusGeneric():
# Make sure beads below this bead are also moved.
for ii in range(self.top_beads-b):
if self.beads[i+ii].state == 0:
- self.beads[i+ii].set_color(self.colors[3])
+ if bead.max_fade_level > 0:
+ self.beads[i+ii].set_color(self.colors[3])
self.beads[i+ii].move_down()
elif dy < 0 and bead.state == 1:
if bead.max_fade_level > 0:
@@ -721,7 +722,8 @@ class AbacusGeneric():
# Make sure beads above this bead are also moved.
for ii in range(b+1):
if self.beads[i-ii].state == 1:
- self.beads[i-ii].set_color(self.colors[3])
+ if bead.max_fade_level > 0:
+ self.beads[i-ii].set_color(self.colors[3])
self.beads[i-ii].move_up()
else:
if dy < 0 and bead.state == 0:
@@ -732,7 +734,8 @@ class AbacusGeneric():
# Make sure beads above this bead are also moved.
for ii in range(b-self.top_beads+1):
if self.beads[i-ii].state == 0:
- self.beads[i-ii].set_color(self.colors[3])
+ if bead.max_fade_level > 0:
+ self.beads[i-ii].set_color(self.colors[3])
self.beads[i-ii].move_up()
elif dy > 0 and bead.state == 1:
if bead.max_fade_level > 0:
@@ -742,7 +745,8 @@ class AbacusGeneric():
# Make sure beads below this bead are also moved.
for ii in range(self.top_beads+self.bot_beads-b):
if self.beads[i+ii].state == 1:
- self.beads[i+ii].set_color(self.colors[3])
+ if bead.max_fade_level > 0:
+ self.beads[i+ii].set_color(self.colors[3])
self.beads[i+ii].move_down()
return