[gimp] Bug 701594 - gimp-image-select-item does not recognize path transformations



commit 64887fe06cb8558d24c92c218b759dce1183afaa
Author: Michael Natterer <mitch gimp org>
Date:   Tue Jun 4 16:48:41 2013 +0200

    Bug 701594 - gimp-image-select-item does not recognize path transformations
    
    pdb: Need to gimp_vectors_freeze()/thaw() around stroke modifications
    so the vector's preview and the cached GimpBezierDesc are invalidated.

 app/pdb/vectors-cmds.c       |   18 ++++++++++++++++++
 tools/pdbgen/pdb/vectors.pdb |   18 ++++++++++++++++++
 2 files changed, 36 insertions(+), 0 deletions(-)
---
diff --git a/app/pdb/vectors-cmds.c b/app/pdb/vectors-cmds.c
index 5adf500..e6e30e5 100644
--- a/app/pdb/vectors-cmds.c
+++ b/app/pdb/vectors-cmds.c
@@ -365,7 +365,9 @@ vectors_stroke_close_invoker (GimpProcedure         *procedure,
                                               _("Close path stroke"),
                                               vectors);
 
+          gimp_vectors_freeze (vectors);
           gimp_stroke_close (stroke);
+          gimp_vectors_thaw (vectors);
         }
       else
         success = FALSE;
@@ -408,7 +410,9 @@ vectors_stroke_translate_invoker (GimpProcedure         *procedure,
                                               _("Translate path stroke"),
                                               vectors);
 
+          gimp_vectors_freeze (vectors);
           gimp_stroke_translate (stroke, off_x, off_y);
+          gimp_vectors_thaw (vectors);
         }
       else
         success = FALSE;
@@ -451,7 +455,9 @@ vectors_stroke_scale_invoker (GimpProcedure         *procedure,
                                               _("Scale path stroke"),
                                               vectors);
 
+          gimp_vectors_freeze (vectors);
           gimp_stroke_scale (stroke, scale_x, scale_y);
+          gimp_vectors_thaw (vectors);
         }
       else
         success = FALSE;
@@ -496,7 +502,9 @@ vectors_stroke_rotate_invoker (GimpProcedure         *procedure,
                                               _("Rotate path stroke"),
                                               vectors);
 
+          gimp_vectors_freeze (vectors);
           gimp_stroke_rotate (stroke, center_x, center_y, angle);
+          gimp_vectors_thaw (vectors);
         }
       else
         success = FALSE;
@@ -539,7 +547,9 @@ vectors_stroke_flip_invoker (GimpProcedure         *procedure,
                                               _("Flip path stroke"),
                                               vectors);
 
+          gimp_vectors_freeze (vectors);
           gimp_stroke_flip (stroke, flip_type, axis);
+          gimp_vectors_thaw (vectors);
         }
       else
         success = FALSE;
@@ -586,7 +596,9 @@ vectors_stroke_flip_free_invoker (GimpProcedure         *procedure,
                                               _("Flip path stroke"),
                                               vectors);
 
+          gimp_vectors_freeze (vectors);
           gimp_stroke_flip_free (stroke, x1, y1, x2, y2);
+          gimp_vectors_thaw (vectors);
         }
       else
         success = FALSE;
@@ -893,7 +905,9 @@ vectors_bezier_stroke_lineto_invoker (GimpProcedure         *procedure,
                                              _("Extend path stroke"),
                                              vectors);
 
+          gimp_vectors_freeze (vectors);
           gimp_bezier_stroke_lineto (stroke, &coord0);
+          gimp_vectors_thaw (vectors);
         }
       else
         success = FALSE;
@@ -947,7 +961,9 @@ vectors_bezier_stroke_conicto_invoker (GimpProcedure         *procedure,
                                              _("Extend path stroke"),
                                              vectors);
 
+          gimp_vectors_freeze (vectors);
           gimp_bezier_stroke_conicto (stroke, &coord0, &coord1);
+          gimp_vectors_thaw (vectors);
         }
       else
         success = FALSE;
@@ -1009,7 +1025,9 @@ vectors_bezier_stroke_cubicto_invoker (GimpProcedure         *procedure,
                                              _("Extend path stroke"),
                                              vectors);
 
+          gimp_vectors_freeze (vectors);
           gimp_bezier_stroke_cubicto (stroke, &coord0, &coord1, &coord2);
+          gimp_vectors_thaw (vectors);
         }
       else
         success = FALSE;
diff --git a/tools/pdbgen/pdb/vectors.pdb b/tools/pdbgen/pdb/vectors.pdb
index e5cd964..aa16512 100644
--- a/tools/pdbgen/pdb/vectors.pdb
+++ b/tools/pdbgen/pdb/vectors.pdb
@@ -325,7 +325,9 @@ HELP
                                           _("Close path stroke"),
                                           vectors);
 
+      gimp_vectors_freeze (vectors);
       gimp_stroke_close (stroke);
+      gimp_vectors_thaw (vectors);
     }
   else
     success = FALSE;
@@ -370,7 +372,9 @@ HELP
                                           _("Translate path stroke"),
                                           vectors);
 
+      gimp_vectors_freeze (vectors);
       gimp_stroke_translate (stroke, off_x, off_y);
+      gimp_vectors_thaw (vectors);
     }
   else
     success = FALSE;
@@ -414,7 +418,9 @@ HELP
                                           _("Scale path stroke"),
                                           vectors);
 
+      gimp_vectors_freeze (vectors);
       gimp_stroke_scale (stroke, scale_x, scale_y);
+      gimp_vectors_thaw (vectors);
     }
   else
     success = FALSE;
@@ -459,7 +465,9 @@ HELP
                                           _("Rotate path stroke"),
                                           vectors);
 
+      gimp_vectors_freeze (vectors);
       gimp_stroke_rotate (stroke, center_x, center_y, angle);
+      gimp_vectors_thaw (vectors);
     }
   else
     success = FALSE;
@@ -503,7 +511,9 @@ HELP
                                           _("Flip path stroke"),
                                           vectors);
 
+      gimp_vectors_freeze (vectors);
       gimp_stroke_flip (stroke, flip_type, axis);
+      gimp_vectors_thaw (vectors);
     }
   else
     success = FALSE;
@@ -552,7 +562,9 @@ HELP
                                           _("Flip path stroke"),
                                           vectors);
 
+      gimp_vectors_freeze (vectors);
       gimp_stroke_flip_free (stroke, x1, y1, x2, y2);
+      gimp_vectors_thaw (vectors);
     }
   else
     success = FALSE;
@@ -865,7 +877,9 @@ HELP
                                          _("Extend path stroke"),
                                          vectors);
 
+      gimp_vectors_freeze (vectors);
       gimp_bezier_stroke_lineto (stroke, &coord0);
+      gimp_vectors_thaw (vectors);
     }
   else
     success = FALSE;
@@ -922,7 +936,9 @@ HELP
                                          _("Extend path stroke"),
                                          vectors);
 
+      gimp_vectors_freeze (vectors);
       gimp_bezier_stroke_conicto (stroke, &coord0, &coord1);
+      gimp_vectors_thaw (vectors);
     }
   else
     success = FALSE;
@@ -985,7 +1001,9 @@ HELP
                                          _("Extend path stroke"),
                                          vectors);
 
+      gimp_vectors_freeze (vectors);
       gimp_bezier_stroke_cubicto (stroke, &coord0, &coord1, &coord2);
+      gimp_vectors_thaw (vectors);
     }
   else
     success = FALSE;


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