[gimp] app: more stuff in gimp-tool-options-manager.c



commit 1b858eb4adf00011332d2d3ef4eb55262f54fdc1
Author: Michael Natterer <mitch gimp org>
Date:   Fri Jun 29 00:52:14 2018 +0200

    app: more stuff in gimp-tool-options-manager.c
    
    tool_options_manager_tool_changed(): also copy the non-global paint
    options of the new tool to the global paint options, so they get used
    when "global_foo" is enabled.

 app/tools/gimp-tool-options-manager.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/app/tools/gimp-tool-options-manager.c b/app/tools/gimp-tool-options-manager.c
index ee0b29cd9d..ad8e14dd3a 100644
--- a/app/tools/gimp-tool-options-manager.c
+++ b/app/tools/gimp-tool-options-manager.c
@@ -480,11 +480,6 @@ tool_options_manager_tool_changed (GimpContext            *user_context,
   if (user_context->gimp->busy)
     return;
 
-  /*  note that in this function we only deal with non-global
-   *  properties, so we never have to copy from or to the global paint
-   *  options
-   */
-
   if (manager->active_tool)
     {
       GimpToolInfo *active = manager->active_tool;
@@ -513,6 +508,12 @@ tool_options_manager_tool_changed (GimpContext            *user_context,
                                     active->context_props &
                                     ~manager->global_props);
 
+      if (GIMP_IS_PAINT_OPTIONS (active->tool_options))
+        tool_options_manager_copy_paint_props (GIMP_PAINT_OPTIONS (active->tool_options),
+                                               manager->global_paint_options,
+                                               active->context_props &
+                                               ~manager->global_props);
+
       /*  then, undefine these properties so the tool syncs with the
        *  user context automatically
        */


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