[gimp/gimp-2-10] app: direct on-canvas color preview when editing a colormap color.



commit 01990c405989cf1315c04201cbb4c16c237d9358
Author: Jehan <jehan girinstud io>
Date:   Thu Mar 7 15:45:17 2019 +0100

    app: direct on-canvas color preview when editing a colormap color.
    
    (cherry picked from commit a24957a80468249a303c7bf9b87a5b53e0fb6f57)

 app/widgets/gimpcolormapeditor.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/app/widgets/gimpcolormapeditor.c b/app/widgets/gimpcolormapeditor.c
index 696378bf90..2c622acb36 100644
--- a/app/widgets/gimpcolormapeditor.c
+++ b/app/widgets/gimpcolormapeditor.c
@@ -411,7 +411,7 @@ gimp_colormap_editor_edit_color (GimpColormapEditor *editor)
                                gimp_dialog_factory_get_singleton (),
                                "gimp-colormap-editor-color-dialog",
                                (const GimpRGB *) &color,
-                               FALSE, FALSE);
+                               TRUE, FALSE);
 
       g_signal_connect (editor->color_dialog, "destroy",
                         G_CALLBACK (gtk_widget_destroyed),
@@ -772,18 +772,15 @@ gimp_colormap_editor_edit_color_update (GimpColorDialog      *dialog,
 {
   GimpImage *image = GIMP_IMAGE_EDITOR (editor)->image;
 
+  gimp_image_set_colormap_entry (image, editor->col_index, color, TRUE);
+  gimp_image_flush (image);
   switch (state)
     {
-    case GIMP_COLOR_DIALOG_UPDATE:
-      break;
-
     case GIMP_COLOR_DIALOG_OK:
-      gimp_image_set_colormap_entry (image, editor->col_index, color, TRUE);
-      gimp_image_flush (image);
-      /* Fall through */
-
     case GIMP_COLOR_DIALOG_CANCEL:
       gtk_widget_hide (editor->color_dialog);
       break;
+    case GIMP_COLOR_DIALOG_UPDATE:
+      break;
     }
 }


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