[gimp] app: save-before-committing!



commit cb615737d33030c0634b08d8dbad8379f6024347
Author: Michael Natterer <mitch gimp org>
Date:   Sun Feb 13 21:33:26 2011 +0100

    app: save-before-committing!

 app/pdb/text-layer-cmds.c       |    7 ++++---
 tools/pdbgen/pdb/text_layer.pdb |    7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/app/pdb/text-layer-cmds.c b/app/pdb/text-layer-cmds.c
index aaa9f23..ba41ab6 100644
--- a/app/pdb/text-layer-cmds.c
+++ b/app/pdb/text-layer-cmds.c
@@ -1102,7 +1102,8 @@ text_layer_resize_invoker (GimpProcedure      *procedure,
     {
       if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
         {
-          gdouble  xres, yres;
+          GimpText *text = gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer));
+          gdouble   xres, yres;
 
           gimp_image_get_resolution (gimp_item_get_image (GIMP_ITEM (layer)),
                                      &xres, &yres);
@@ -1111,10 +1112,10 @@ text_layer_resize_invoker (GimpProcedure      *procedure,
                                _("Set text layer attribute"),
                                "box-mode",   GIMP_TEXT_BOX_FIXED,
                                "box-width",  gimp_pixels_to_units (width,
-                                                                   GIMP_UNIT_PIXEL,
+                                                                   text->unit,
                                                                    xres),
                                "box-height", gimp_pixels_to_units (height,
-                                                                   GIMP_UNIT_PIXEL,
+                                                                   text->unit,
                                                                    yres),
                                NULL);
         }
diff --git a/tools/pdbgen/pdb/text_layer.pdb b/tools/pdbgen/pdb/text_layer.pdb
index d482945..3c3db43 100644
--- a/tools/pdbgen/pdb/text_layer.pdb
+++ b/tools/pdbgen/pdb/text_layer.pdb
@@ -1175,7 +1175,8 @@ HELP
 {
   if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
     {
-      gdouble  xres, yres;
+      GimpText *text = gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer));
+      gdouble   xres, yres;
 
       gimp_image_get_resolution (gimp_item_get_image (GIMP_ITEM (layer)),
                                  &xres, &yres);
@@ -1184,10 +1185,10 @@ HELP
                            _("Set text layer attribute"),
                            "box-mode",   GIMP_TEXT_BOX_FIXED,
                            "box-width",  gimp_pixels_to_units (width,
-                                                               GIMP_UNIT_PIXEL,
+                                                               text->unit,
                                                                xres),
                            "box-height", gimp_pixels_to_units (height,
-                                                               GIMP_UNIT_PIXEL,
+                                                               text->unit,
                                                                yres),
                            NULL);
     }



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