[gimp/gimp-2-10] app: leave locked pixels alone when cropping



commit d5fc3e800999b400f803e93b881b390bbaa0d03a
Author: woob <thetoastcaper gmail com>
Date:   Sun Mar 29 02:24:07 2020 -0400

    app: leave locked pixels alone when cropping
    
    Cropping tools will no longer discard layer data that falls out of the
    crop region if the layer's pixels are locked
    
    (cherry picked from commit 9a9e2e9a19fd04e93bbb0c5e06902d5769e88c5c)

 app/core/gimpimage-crop.c   | 2 +-
 app/tools/gimpcropoptions.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/app/core/gimpimage-crop.c b/app/core/gimpimage-crop.c
index 107be59dda..c6814d4d65 100644
--- a/app/core/gimpimage-crop.c
+++ b/app/core/gimpimage-crop.c
@@ -122,7 +122,7 @@ gimp_image_crop (GimpImage    *image,
 
       gimp_item_translate (item, -x, -y, TRUE);
 
-      if (crop_layers)
+      if (crop_layers && ! gimp_item_is_content_locked (item))
         {
           gint off_x, off_y;
           gint lx1, ly1, lx2, ly2;
diff --git a/app/tools/gimpcropoptions.c b/app/tools/gimpcropoptions.c
index e067a2016c..8884e2ea81 100644
--- a/app/tools/gimpcropoptions.c
+++ b/app/tools/gimpcropoptions.c
@@ -99,7 +99,7 @@ gimp_crop_options_class_init (GimpCropOptionsClass *klass)
   GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_DELETE_PIXELS,
                             "delete-pixels",
                             _("Delete cropped pixels"),
-                            _("Discard layer data that falls out of the crop region"),
+                            _("Discard non-locked layer data that falls out of the crop region"),
                             TRUE,
                             GIMP_PARAM_STATIC_STRINGS);
 


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