[gimp/goat-invasion: 325/608] app: always create a new tool in filters_filter_cmd_callback()



commit 9ff23693355fd09c3bb81b3eee060c2b4821106c
Author: Michael Natterer <mitch gimp org>
Date:   Fri Mar 30 12:13:56 2012 +0200

    app: always create a new tool in filters_filter_cmd_callback()
    
    Things will get more complicated in GimpOperationTool soon, and we
    don't want to mess around with reconfiguring *everything* in the tool.

 app/actions/filters-commands.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/app/actions/filters-commands.c b/app/actions/filters-commands.c
index eb196a1..366a055 100644
--- a/app/actions/filters-commands.c
+++ b/app/actions/filters-commands.c
@@ -54,17 +54,20 @@ filters_filter_cmd_callback (GtkAction   *action,
 
   active_tool = tool_manager_get_active (image->gimp);
 
-  if (! GIMP_IS_OPERATION_TOOL (active_tool))
+  if (G_TYPE_FROM_INSTANCE (active_tool) != GIMP_TYPE_OPERATION_TOOL)
     {
       GimpToolInfo *tool_info = gimp_get_tool_info (image->gimp,
                                                     "gimp-operation-tool");
 
       if (GIMP_IS_TOOL_INFO (tool_info))
-        {
-          gimp_context_set_tool (action_data_get_context (data), tool_info);
-          active_tool = tool_manager_get_active (image->gimp);
-        }
+        gimp_context_set_tool (action_data_get_context (data), tool_info);
     }
+  else
+    {
+      gimp_context_tool_changed (action_data_get_context (data));
+    }
+
+  active_tool = tool_manager_get_active (image->gimp);
 
   if (GIMP_IS_OPERATION_TOOL (active_tool))
     {



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