Ticket #3602: 0001-Target-rectangle-in-Stamp-at-first-usage-SL-3602.patch

File 0001-Target-rectangle-in-Stamp-at-first-usage-SL-3602.patch, 1.6 KB (added by humitos, 12 years ago)
  • Area.py

    From ef6bc79da0088b8fdb9d8435ed8aa70cdca0b163 Mon Sep 17 00:00:00 2001
    Message-Id: <ef6bc79da0088b8fdb9d8435ed8aa70cdca0b163.1338301636.git.humitos@gmail.com>
    From: Manuel Kaufmann <humitos@gmail.com>
    Date: Tue, 29 May 2012 11:25:10 -0300
    Subject: [PATCH Paint] Target rectangle in Stamp at first usage SL #3602
    
    Show the target rectangle inmediatly when the Stamp tool is selected and don't
    remove the sensitive of the Stamp tool button if it's being used.
    
    Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
    ---
     Area.py    |    3 +++
     toolbox.py |    7 +++++--
     2 files changed, 8 insertions(+), 2 deletions(-)
    
    diff --git a/Area.py b/Area.py
    index fa841df..4cab9db 100644
    a b class Area(gtk.DrawingArea): 
    786786        self.resized_stamp = self.pixbuf_stamp.scale_simple(wr, hr,
    787787                                 gtk.gdk.INTERP_HYPER)
    788788
     789        # Remove selected area
     790        self.getout()
     791
    789792        return self.resized_stamp
    790793
    791794    def undo(self):
  • toolbox.py

    diff --git a/toolbox.py b/toolbox.py
    index f781b4a..dcdfeb0 100644
    a b class ToolsToolbarBuilder(): 
    349349        self._verify_sensitive_buttons()
    350350
    351351    def _verify_sensitive_buttons(self):
    352         is_selected = self._activity.area.is_selected()
    353         self._tool_stamp.set_sensitive(is_selected)
     352        # Check if there is an area selected or if the "stamp" tool is
     353        # being used
     354        sensitive = self._activity.area.is_selected() or \
     355            self.tool['name'] == 'stamp'
     356        self._tool_stamp.set_sensitive(sensitive)
    354357
    355358
    356359class ButtonFillColor(ColorToolButton):