Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorolpc <olpc@xo-05-26-CC.localdomain>2008-12-08 21:13:22 (GMT)
committer olpc <olpc@xo-05-26-CC.localdomain>2008-12-08 21:13:22 (GMT)
commit6ac47cd86f55cdf06eede45077173af0502667f6 (patch)
treea1790c9712a1e57390e132c82625f6fb89e35e40
parent19febbb9de90eaf89f426fb7bfcca21ae4b96cf1 (diff)
Allow stored color retrieval to work at the Brush Controls panel.
-rwxr-xr-xcolors.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/colors.py b/colors.py
index 393f473..5436936 100755
--- a/colors.py
+++ b/colors.py
@@ -339,6 +339,9 @@ class Colors(activity.Activity, ExportedGObject):
self.width = gtk.gdk.screen_width()
self.height = gtk.gdk.screen_height()
+ # Set the initial mode to None, it will be set to Intro on the first update.
+ self.mode = None
+
# Set up various systems.
self.init_input()
self.init_zoom()
@@ -359,9 +362,6 @@ class Colors(activity.Activity, ExportedGObject):
# Start camera processing.
#self.init_camera()
- # Set the initial mode to None, it will be set to Intro on the first update.
- self.mode = None
-
# Set up mesh networking.
self.init_mesh()
@@ -1174,6 +1174,10 @@ class Colors(activity.Activity, ExportedGObject):
self.easel.play_command(DrawCommand.create_color_change(brush.color), True)
self.easel.play_command(DrawCommand.create_size_change(brush.control, brush.type, brush.size/float(self.easel.width), brush.opacity), True)
+ if self.mode == Colors.MODE_PALETTE:
+ self.brush_controls.set_brush(self.easel.brush)
+ self.brush_controls.queue_draw()
+
self.brushpreviewarea.queue_draw()
def pickup_color(self, pos):