[gimp/gimp-2-8] Bug 601139 - Gifg no longer usable with the new brush behavior



commit e0e2b83005b29160ef9753b6e8f6cf43bc19f75d
Author: Michael Natterer <mitch gimp org>
Date:   Thu Sep 25 00:24:34 2014 +0200

    Bug 601139 - Gifg no longer usable with the new brush behavior
    
    Call gimp_context_set_brush_default_size() after each
    gimp_context_set_brush() which restores the original
    behavior of the plug-in.
    
    (cherry picked from commit fa92203dd038ee268daaf6fb7c187bee661b4ec6)

 plug-ins/gfig/gfig-style.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/gfig/gfig-style.c b/plug-ins/gfig/gfig-style.c
index 0b3d81e..2297121 100644
--- a/plug-ins/gfig/gfig-style.c
+++ b/plug-ins/gfig/gfig-style.c
@@ -521,6 +521,7 @@ gfig_brush_changed_callback (GimpBrushSelectButton *button,
   gfig_context->bdesc.width = width;
   gfig_context->bdesc.height = height;
   gimp_context_set_brush (brush_name);
+  gimp_context_set_brush_default_size ();
 
   gfig_paint_callback ();
 }
@@ -611,10 +612,12 @@ gfig_style_apply (Style *style)
 
   gimp_context_set_background (&style->background);
 
-  if (!gimp_context_set_brush (style->brush_name))
+  if (! gimp_context_set_brush (style->brush_name))
     g_message ("Style apply: Failed to set brush to '%s' in style '%s'",
                style->brush_name, style->name);
 
+  gimp_context_set_brush_default_size ();
+
   gimp_context_set_pattern (style->pattern);
 
   gimp_context_set_gradient (style->gradient);
@@ -683,10 +686,12 @@ gfig_style_set_context_from_style (Style *style)
                                &style->foreground);
   gimp_color_button_set_color (GIMP_COLOR_BUTTON (gfig_context->bg_color_button),
                                &style->background);
-  if (!gimp_context_set_brush (style->brush_name))
+  if (! gimp_context_set_brush (style->brush_name))
     g_message ("Style from context: Failed to set brush to '%s'",
                style->brush_name);
 
+  gimp_context_set_brush_default_size ();
+
   gimp_brush_select_button_set_brush (GIMP_BRUSH_SELECT_BUTTON (gfig_context->brush_select),
                                       style->brush_name, -1.0, -1, -1);  /* FIXME */
 


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