Ticket #3491: 0001-Keep-flood-fill-cursor-after-clicks-SL-3491.patch

File 0001-Keep-flood-fill-cursor-after-clicks-SL-3491.patch, 1.6 KB (added by humitos, 12 years ago)
  • Area.py

    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): 
    670670        fill(self.pixmap, self.gc, x, y, width,
    671671                height, self.gc_line.foreground.pixel)
    672672        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)
    674676
    675677    def flood_fill(self, x, y, fill_color):
    676678        width, height = self.window.get_size()
    class Area(gtk.DrawingArea): 
    707709
    708710        self.pixmap.draw_image(self.gc, gdk_image, 0, 0, 0, 0, width, height)
    709711        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)
    711716
    712717    def pick_color(self, x, y):
    713718        gdk_image = self.pixmap.get_image(x, y, 1, 1)