From 6ac47cd86f55cdf06eede45077173af0502667f6 Mon Sep 17 00:00:00 2001 From: olpc Date: Mon, 08 Dec 2008 21:13:22 +0000 Subject: Allow stored color retrieval to work at the Brush Controls panel. --- (limited to 'colors.py') 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): -- cgit v0.9.1