[gimp/soc-2010-cage-2] app: call gimp_canvas_item_begin, end_change() around passe partout changes



commit b1664c0bef2a921568fdb8270f985a30c9e49b6f
Author: Michael Natterer <mitch gimp org>
Date:   Fri Nov 12 20:18:03 2010 +0100

    app: call gimp_canvas_item_begin,end_change() around passe partout changes
    
    Also remove the "highlight" member from the GimpDisplayShell struct.

 app/display/gimpdisplayshell.c |   10 ++++------
 app/display/gimpdisplayshell.h |    1 -
 2 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c
index efeb97c..2e0973c 100644
--- a/app/display/gimpdisplayshell.c
+++ b/app/display/gimpdisplayshell.c
@@ -787,12 +787,6 @@ gimp_display_shell_dispose (GObject *object)
       shell->checkerboard = NULL;
     }
 
-  if (shell->highlight)
-    {
-      g_slice_free (GdkRectangle, shell->highlight);
-      shell->highlight = NULL;
-    }
-
   if (shell->mask)
     {
       g_object_unref (shell->mask);
@@ -1761,6 +1755,8 @@ gimp_display_shell_set_highlight (GimpDisplayShell   *shell,
 {
   g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
 
+  gimp_canvas_item_begin_change (shell->passe_partout);
+
   if (highlight)
     {
       g_object_set (shell->passe_partout,
@@ -1775,6 +1771,8 @@ gimp_display_shell_set_highlight (GimpDisplayShell   *shell,
     {
       gimp_canvas_item_set_visible (shell->passe_partout, FALSE);
     }
+
+  gimp_canvas_item_end_change (shell->passe_partout);
 }
 
 /**
diff --git a/app/display/gimpdisplayshell.h b/app/display/gimpdisplayshell.h
index b186be0..bf97b00 100644
--- a/app/display/gimpdisplayshell.h
+++ b/app/display/gimpdisplayshell.h
@@ -195,7 +195,6 @@ struct _GimpDisplayShell
 
   gboolean           button_press_before_focus;
 
-  GdkRectangle      *highlight;        /* in image coordinates, can be NULL   */
   GimpDrawable      *mask;
   GimpRGB            mask_color;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]