[gimp] Bug 793150 - gimp_display_get_image: assertion...



commit 4ae8f5a7b488c75a3e7257c466ee35f1712b20f1
Author: Jehan <jehan girinstud io>
Date:   Sun Feb 11 01:23:08 2018 +0100

    Bug 793150 - gimp_display_get_image: assertion...
    
    ... 'GIMP_IS_DISPLAY (display)' failed.
    This may happen when committing first a transform tool, then switching
    to another tool. In this case, the tool manager will attempt to commit
    again because gimp_tool_has_display() returns TRUE since status displays
    were not cleared. Unfortunately transform tools don't handle very well
    trying to commit when it was already done (hence both GimpTool and
    GimpDrawTool displays are NULL).
    The proposed solution is to clear the statuses after committing.

 app/tools/gimptool.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/app/tools/gimptool.c b/app/tools/gimptool.c
index 7e8e2db..aadd629 100644
--- a/app/tools/gimptool.c
+++ b/app/tools/gimptool.c
@@ -689,6 +689,8 @@ gimp_tool_control (GimpTool       *tool,
        */
       GIMP_TOOL_GET_CLASS (tool)->control (tool, action, display);
       GIMP_TOOL_GET_CLASS (tool)->control (tool, GIMP_TOOL_ACTION_HALT, display);
+
+      gimp_tool_clear_status (tool);
       break;
     }
 }


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