[gimp] app: always update GimpHistogramView bins when changing histograms



commit 44ffbe74dfb1a165639fd3275ea6e0439f3feafd
Author: Ell <ell_se yahoo com>
Date:   Fri May 11 21:41:14 2018 -0400

    app: always update GimpHistogramView bins when changing histograms
    
    ... and not only when histogram != NULL, since the bin count may
    change in either case.

 app/widgets/gimphistogramview.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/app/widgets/gimphistogramview.c b/app/widgets/gimphistogramview.c
index 2b8f6b1..ff6bb4b 100644
--- a/app/widgets/gimphistogramview.c
+++ b/app/widgets/gimphistogramview.c
@@ -643,11 +643,11 @@ gimp_histogram_view_set_histogram (GimpHistogramView *view,
                             G_CALLBACK (gimp_histogram_view_notify),
                             view);
 
-          gimp_histogram_view_update_bins (view);
-
           if (view->channel >= gimp_histogram_n_channels (histogram))
             gimp_histogram_view_set_channel (view, GIMP_HISTOGRAM_VALUE);
         }
+
+      gimp_histogram_view_update_bins (view);
     }
 
   gtk_widget_queue_draw (GTK_WIDGET (view));
@@ -693,11 +693,11 @@ gimp_histogram_view_set_background (GimpHistogramView *view,
                             G_CALLBACK (gimp_histogram_view_notify),
                             view);
 
-          gimp_histogram_view_update_bins (view);
-
           if (view->channel >= gimp_histogram_n_channels (histogram))
             gimp_histogram_view_set_channel (view, GIMP_HISTOGRAM_VALUE);
         }
+
+      gimp_histogram_view_update_bins (view);
     }
 
   gtk_widget_queue_draw (GTK_WIDGET (view));


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