[gimp/gimp-2-10] Issue #3435 - GIMP encountered an error: GIMP-CRITICAL:...



commit 142105e0e242e75847ab6f8a7705e82235b6fb94
Author: Michael Natterer <mitch gimp org>
Date:   Wed Jun 26 18:53:22 2019 +0200

    Issue #3435 - GIMP encountered an error: GIMP-CRITICAL:...
    
    ...gimp_size_entry_set_resolution: assertion 'GIMP_IS_SIZE_ENTRY (gse)'
    failed
    
    In gimp_tool_options_manager_tool_changed() make sure the new tool's
    tool options GUI always exists, so tools can access it even if the
    tool options dockable is not currently open.
    
    (cherry picked from commit c3752ba743294dec800431252273507d9687a210)

 app/tools/gimp-tool-options-manager.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/app/tools/gimp-tool-options-manager.c b/app/tools/gimp-tool-options-manager.c
index 22d1f2b29b..a466d65a1a 100644
--- a/app/tools/gimp-tool-options-manager.c
+++ b/app/tools/gimp-tool-options-manager.c
@@ -35,6 +35,8 @@
 
 #include "paint/gimppaintoptions.h"
 
+#include "widgets/gimpwidgets-utils.h"
+
 #include "gimp-tool-options-manager.h"
 
 
@@ -427,6 +429,13 @@ tool_options_manager_tool_changed (GimpContext            *user_context,
     {
       GimpToolInfo *active = manager->active_tool;
 
+      /*  make sure the tool options GUI always exists, this call
+       *  creates it if needed, so tools always have their option GUI
+       *  available even if the tool options dockable is not open, see
+       *  for example issue #3435
+       */
+      gimp_tools_get_tool_options_gui (active->tool_options);
+
       /*  copy the new tool's context properties that are not
        *  currently global to the user context, so they get used by
        *  everything


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