diff options
Diffstat (limited to 'Area.py')
-rw-r--r-- | Area.py | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1198,7 +1198,7 @@ class Area(Gtk.DrawingArea): self._do_process(widget, proc_grayscale) - def invert_colors(self, widget): + def invert_colors(self, widget, old_cursor, source_id, window): """Apply invert effect. @param self -- the Area object (GtkDrawingArea) @@ -1206,7 +1206,7 @@ class Area(Gtk.DrawingArea): """ - def internal_invert(self, old_cursor): + def internal_invert(self, old_cursor, source_id, window): # load a array with the surface data for array_type in ['H', 'I', 'L']: pixels = array.array(array_type) @@ -1237,11 +1237,11 @@ class Area(Gtk.DrawingArea): self.queue_draw() self.enable_undo() - self.get_window().set_cursor(old_cursor) + GObject.source_remove(source_id) + window.set_cursor(old_cursor) - old_cursor = self.get_window().get_cursor() - self.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.WATCH)) - GObject.idle_add(internal_invert, self, old_cursor) + GObject.idle_add(internal_invert, self, old_cursor, + source_id, window) def mirror(self, widget, horizontal=True): """Apply mirror horizontal/vertical effect. |