[gimp] app: don't let GimpColorTool change displays when GimpDrawTool has a widget



commit 6f2948fe54128171e3f943dd8b0a03e783c2786b
Author: Michael Natterer <mitch gimp org>
Date:   Sat Jul 1 16:26:34 2017 +0200

    app: don't let GimpColorTool change displays when GimpDrawTool has a widget
    
    because widgets are bound to one GimpDisplayShell. Also, chain up
    unconditionally in gimp_color_tool_draw(), we always want to draw the
    widget even while picking colors.

 app/tools/gimpcolortool.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/app/tools/gimpcolortool.c b/app/tools/gimpcolortool.c
index 8a10312..06c764f 100644
--- a/app/tools/gimpcolortool.c
+++ b/app/tools/gimpcolortool.c
@@ -305,7 +305,9 @@ gimp_color_tool_oper_update (GimpTool         *tool,
 
       gimp_draw_tool_pause (draw_tool);
 
-      if (gimp_draw_tool_is_active (draw_tool) &&
+      if (! draw_tool->widget &&
+
+          gimp_draw_tool_is_active (draw_tool) &&
           (draw_tool->display != display ||
            ! proximity))
         {
@@ -332,7 +334,9 @@ gimp_color_tool_oper_update (GimpTool         *tool,
       color_tool->center_x = coords->x;
       color_tool->center_y = coords->y;
 
-      if (! gimp_draw_tool_is_active (draw_tool) &&
+      if (! draw_tool->widget &&
+
+          ! gimp_draw_tool_is_active (draw_tool) &&
           proximity)
         {
           gimp_draw_tool_start (draw_tool, display);
@@ -405,6 +409,8 @@ gimp_color_tool_draw (GimpDrawTool *draw_tool)
 {
   GimpColorTool *color_tool = GIMP_COLOR_TOOL (draw_tool);
 
+  GIMP_DRAW_TOOL_CLASS (parent_class)->draw (draw_tool);
+
   if (color_tool->enabled)
     {
       if (color_tool->sample_point)
@@ -435,10 +441,6 @@ gimp_color_tool_draw (GimpDrawTool *draw_tool)
                                         2 * radius + 1);
         }
     }
-  else
-    {
-      GIMP_DRAW_TOOL_CLASS (parent_class)->draw (draw_tool);
-    }
 }
 
 static gboolean


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