[gimp/gimp-2-10] plug-ins: in screenshot, keep image dirty; keep history clean



commit 3c2bc14c576c4c35eb17a1e0c7be12466c4d0ad8
Author: Ell <ell_se yahoo com>
Date:   Sun Feb 16 23:01:49 2020 +0200

    plug-ins: in screenshot, keep image dirty; keep history clean
    
    In the screenshot plug-in, don't clean the image, since it's not
    backed by any persistent source, and disable undo while modifying
    it, so that the initial edit history is clean.
    
    (cherry picked from commit 4fe821789805a2665961fdded047c66ad78a98ad)

 plug-ins/screenshot/screenshot.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/plug-ins/screenshot/screenshot.c b/plug-ins/screenshot/screenshot.c
index 08d597e4d7..c8f205ccc2 100644
--- a/plug-ins/screenshot/screenshot.c
+++ b/plug-ins/screenshot/screenshot.c
@@ -317,6 +317,8 @@ run (const gchar      *name,
     {
       gchar *comment = gimp_get_default_comment ();
 
+      gimp_image_undo_disable (image_ID);
+
       if (shootvals.profile_policy == SCREENSHOT_PROFILE_POLICY_SRGB)
         {
           GimpColorProfile *srgb_profile = gimp_color_profile_new_rgb_srgb ();
@@ -342,7 +344,7 @@ run (const gchar      *name,
           g_free (comment);
         }
 
-      gimp_image_clean_all (image_ID);
+      gimp_image_undo_enable (image_ID);
 
       if (run_mode == GIMP_RUN_INTERACTIVE)
         {


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