[gimp/gimp-2-8] Bug 792686 - Colormap widget not updated when adding entry



commit f161de1723328fd672e2eadda057abfb7d3dcba4
Author: Michael Natterer <mitch gimp org>
Date:   Tue Mar 20 00:53:57 2018 +0100

    Bug 792686 - Colormap widget not updated when adding entry
    
    gimp_image_add_colormap_entry(): increment private->n_colors *before*
    calling gimp_image_colormap_set_palette_entry() so it actually adds an
    entry.
    
    (cherry picked from commit 28d9e43f5366a12a86d666a071c490c841d40743)

 app/core/gimpimage-colormap.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/app/core/gimpimage-colormap.c b/app/core/gimpimage-colormap.c
index e2e0ea8..bbde290 100644
--- a/app/core/gimpimage-colormap.c
+++ b/app/core/gimpimage-colormap.c
@@ -295,11 +295,11 @@ gimp_image_add_colormap_entry (GimpImage     *image,
                       &private->colormap[private->n_colors * 3 + 1],
                       &private->colormap[private->n_colors * 3 + 2]);
 
+  private->n_colors++;
+
   if (private->palette)
     gimp_image_colormap_set_palette_entry (image, private->n_colors - 1);
 
-  private->n_colors++;
-
   gimp_image_colormap_changed (image, -1);
 }
 


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