[gimp] Revert "app: save gradient first and last color with dynamics color output..."



commit c7adff4f6fca783238edefe3e9bcb8d15ada83e4
Author: Jehan <jehan girinstud io>
Date:   Thu Oct 8 19:12:37 2015 +0200

    Revert "app: save gradient first and last color with dynamics color output..."
    
    This reverts commit 15b5b2c8b37f55f4cd30ef0083624d86b7ec5723.
    This feature is "undiscoverable" according to Mitch, and we are not sure
    how much the endpoint colors are special to the user.

 app/paint/gimppaintbrush.c |   25 ++++++++++---------------
 1 files changed, 10 insertions(+), 15 deletions(-)
---
diff --git a/app/paint/gimppaintbrush.c b/app/paint/gimppaintbrush.c
index 4233cae..a41c278 100644
--- a/app/paint/gimppaintbrush.c
+++ b/app/paint/gimppaintbrush.c
@@ -98,25 +98,20 @@ gimp_paintbrush_paint (GimpPaintCore    *paint_core,
           GimpContext   *context = GIMP_CONTEXT (paint_options);
           GimpBrushCore *brush_core = GIMP_BRUSH_CORE (paint_core);
           GimpDynamics  *dynamics;
-          GimpRGB        color;
 
           dynamics = gimp_context_get_dynamics (GIMP_CONTEXT (paint_options));
 
-          if (gimp_dynamics_is_output_enabled (dynamics, GIMP_DYNAMICS_OUTPUT_COLOR))
+          if (! gimp_dynamics_is_output_enabled (dynamics, GIMP_DYNAMICS_OUTPUT_COLOR) &&
+              (! brush_core->brush || ! gimp_brush_get_pixmap (brush_core->brush)))
             {
-              /* Getting colors from a gradient. */
-              GimpGradient *gradient = gimp_context_get_gradient (context);
-
-              gimp_gradient_get_color_at (gradient, context, NULL, 0.0, FALSE, &color);
-              gimp_palettes_add_color_history (context->gimp, &color);
-              gimp_gradient_get_color_at (gradient, context, NULL, 1.0, FALSE, &color);
-              gimp_palettes_add_color_history (context->gimp, &color);
-            }
-          else if (! brush_core->brush || ! gimp_brush_get_pixmap (brush_core->brush))
-            {
-              /* We don't save color history for pixmap brushes. */
-              gimp_context_get_foreground (context, &color);
-              gimp_palettes_add_color_history (context->gimp, &color);
+              /* We don't save gradient color history and
+               * pixmap brushes have no color to save.
+               */
+              GimpRGB foreground;
+
+              gimp_context_get_foreground (context, &foreground);
+              gimp_palettes_add_color_history (context->gimp,
+                                               &foreground);
             }
         }
       break;


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