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



commit 4fe821789805a2665961fdded047c66ad78a98ad
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.

 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 2d179e318a..c1c52acdac 100644
--- a/plug-ins/screenshot/screenshot.c
+++ b/plug-ins/screenshot/screenshot.c
@@ -353,6 +353,8 @@ screenshot_run (GimpProcedure        *procedure,
     {
       gchar *comment = gimp_get_default_comment ();
 
+      gimp_image_undo_disable (image);
+
       if (shootvals.profile_policy == SCREENSHOT_PROFILE_POLICY_SRGB)
         {
           GimpColorProfile *srgb_profile = gimp_color_profile_new_rgb_srgb ();
@@ -378,7 +380,7 @@ screenshot_run (GimpProcedure        *procedure,
           g_free (comment);
         }
 
-      gimp_image_clean_all (image);
+      gimp_image_undo_enable (image);
 
       if (run_mode == GIMP_RUN_INTERACTIVE)
         {


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