[gimp] app: make sure tool options are created with the right tool set



commit bb00c53bf545bdf7c9bef7e7af6d089f8ad89117
Author: Michael Natterer <mitch gimp org>
Date:   Tue Apr 20 20:04:24 2010 +0200

    app: make sure tool options are created with the right tool set

 app/core/gimptoolinfo.c   |    4 +++-
 app/core/gimptoolpreset.c |    5 +++++
 2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/app/core/gimptoolinfo.c b/app/core/gimptoolinfo.c
index 2ed3a06..2619443 100644
--- a/app/core/gimptoolinfo.c
+++ b/app/core/gimptoolinfo.c
@@ -268,7 +268,9 @@ gimp_tool_info_new (Gimp                *gimp,
                                               NULL);
     }
 
-  g_object_set (tool_info->tool_options, "tool-info", tool_info, NULL);
+  g_object_set (tool_info->tool_options,
+                "tool",      tool_info,
+                "tool-info", tool_info, NULL);
 
   if (tool_info->context_props)
     {
diff --git a/app/core/gimptoolpreset.c b/app/core/gimptoolpreset.c
index dcd0522..57d95fb 100644
--- a/app/core/gimptoolpreset.c
+++ b/app/core/gimptoolpreset.c
@@ -301,6 +301,11 @@ gimp_tool_preset_deserialize_property (GimpConfig *config,
             break;
           }
 
+        /* this is a hack */
+        g_object_set (options,
+                      "tool-info", gimp_context_get_tool (GIMP_CONTEXT (options)),
+                      NULL);
+
         g_value_take_object (value, options);
       }
       break;



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