[gimp] app: fix infinite recursion in	gimp_brush_core_create_bound_segs()
- From: Michael Natterer <mitch src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gimp] app: fix infinite recursion in	gimp_brush_core_create_bound_segs()
 
- Date: Thu, 23 Sep 2010 21:37:25 +0000 (UTC)
 
commit d921f8520b3ffc0b37d0b5ff9f1da05b1b7ffd79
Author: Michael Natterer <mitch gimp org>
Date:   Thu Sep 23 23:35:59 2010 +0200
    app: fix infinite recursion in gimp_brush_core_create_bound_segs()
    
    Block the core's brush-invalidate callback while temporarily changing
    the brush's aspect ratio.
 app/paint/gimpbrushcore.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/app/paint/gimpbrushcore.c b/app/paint/gimpbrushcore.c
index 0cec72a..8eabb8c 100644
--- a/app/paint/gimpbrushcore.c
+++ b/app/paint/gimpbrushcore.c
@@ -973,12 +973,20 @@ gimp_brush_core_create_bound_segs (GimpBrushCore    *core,
 
           ratio = gimp_brush_generated_get_aspect_ratio (generated_brush);
 
+          g_signal_handlers_block_by_func (generated_brush,
+                                           gimp_brush_core_invalidate_cache,
+                                           core);
+
           gimp_brush_generated_set_aspect_ratio (generated_brush, 1.0);
 
           mask = gimp_brush_transform_mask (core->main_brush,
                                             1.0, 1.0, 0.0, 1.0);
 
           gimp_brush_generated_set_aspect_ratio (generated_brush, ratio);
+
+          g_signal_handlers_unblock_by_func (generated_brush,
+                                             gimp_brush_core_invalidate_cache,
+                                             core);
         }
       else
         {
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]