From a4fb2a692d2e1c1ed5e904a32732d6d6e6eb051f Mon Sep 17 00:00:00 2001
Message-Id: <a4fb2a692d2e1c1ed5e904a32732d6d6e6eb051f.1335817009.git.humitos@gmail.com>
From: Manuel Kaufmann <humitos@gmail.com>
Date: Mon, 30 Apr 2012 17:14:11 -0300
Subject: [PATCH Paint] Keep flood fill cursor after clicks SL #3491
When the user selects the Paint Bucket tool and clicks on the canvas, the bucket
cursor is kept until the user selects another tool.
Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
---
Area.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/Area.py b/Area.py
index aae3d78..50c0744 100644
a
|
b
|
class Area(gtk.DrawingArea): |
670 | 670 | fill(self.pixmap, self.gc, x, y, width, |
671 | 671 | height, self.gc_line.foreground.pixel) |
672 | 672 | widget.queue_draw() |
673 | | self.window.set_cursor(None) |
| 673 | display = gtk.gdk.display_get_default() |
| 674 | cursor = gtk.gdk.cursor_new_from_name(display, 'paint-bucket') |
| 675 | self.window.set_cursor(cursor) |
674 | 676 | |
675 | 677 | def flood_fill(self, x, y, fill_color): |
676 | 678 | width, height = self.window.get_size() |
… |
… |
class Area(gtk.DrawingArea): |
707 | 709 | |
708 | 710 | self.pixmap.draw_image(self.gc, gdk_image, 0, 0, 0, 0, width, height) |
709 | 711 | self.queue_draw() |
710 | | self.window.set_cursor(None) |
| 712 | |
| 713 | display = gtk.gdk.display_get_default() |
| 714 | cursor = gtk.gdk.cursor_new_from_name(display, 'paint-bucket') |
| 715 | self.window.set_cursor(cursor) |
711 | 716 | |
712 | 717 | def pick_color(self, x, y): |
713 | 718 | gdk_image = self.pixmap.get_image(x, y, 1, 1) |