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



commit c3752ba743294dec800431252273507d9687a210
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.

 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 f37b67e451..c1e5f55eb0 100644
--- a/app/tools/gimp-tool-options-manager.c
+++ b/app/tools/gimp-tool-options-manager.c
@@ -34,6 +34,8 @@
 
 #include "paint/gimppaintoptions.h"
 
+#include "widgets/gimpwidgets-utils.h"
+
 #include "gimp-tool-options-manager.h"
 
 
@@ -423,6 +425,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]