[gimp] Bug 794926 - Foreground select tool: several critical errors when ...



commit 440be88035812bfbe290c203b396b24b88de1eb5
Author: Thomas Manni <thomas manni free fr>
Date:   Sun Apr 8 13:03:11 2018 +0200

    Bug 794926 - Foreground select tool: several critical errors when ...
    
    ... double click during trimap painting
    
    Disable double click when the tool is in trimap paint state.

 app/tools/gimpforegroundselecttool.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/app/tools/gimpforegroundselecttool.c b/app/tools/gimpforegroundselecttool.c
index 8e0ad81..c98a0a4 100644
--- a/app/tools/gimpforegroundselecttool.c
+++ b/app/tools/gimpforegroundselecttool.c
@@ -291,6 +291,12 @@ gimp_foreground_select_tool_initialize (GimpTool     *tool,
 
   tool->display = display;
 
+  /*  enable double click for the FreeSelectTool, because it may have been
+   *  disabled if the tool has switched to MATTING_STATE_PAINT_TRIMAP,
+   *  in gimp_foreground_select_tool_set_trimap().
+   */
+  gimp_tool_control_set_wants_double_click (tool->control, TRUE);
+
   fg_select->state = MATTING_STATE_FREE_SELECT;
 
   if (! fg_select->gui)
@@ -1019,6 +1025,9 @@ gimp_foreground_select_tool_set_trimap (GimpForegroundSelectTool *fg_select)
 
   gimp_tool_control_set_toggled (tool->control, FALSE);
 
+  /* disable double click in paint trimap state */
+  gimp_tool_control_set_wants_double_click (tool->control, FALSE);
+
   fg_select->state = MATTING_STATE_PAINT_TRIMAP;
 
   gimp_foreground_select_tool_update_gui (fg_select);


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