From 127510cd81f615815302a6c94319d2ff36f5efd1 Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Tue, 31 Mar 2026 19:28:05 +0000 Subject: [PATCH] core: Use MAX_CHANNELS for Histogram limit gimphistogram.c used its own custom MAX_N_COMPONENTS define for the max value of its "n-components" property. Since this value is the same as MAX_CHANNELS, it would be good to use the global constant so the histogram limit automatically updates when we added a new format with a larger number of components such as CMYKA. --- app/core/gimphistogram.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/core/gimphistogram.c b/app/core/gimphistogram.c index 64ab7b5dec..3dc53cb610 100644 --- a/app/core/gimphistogram.c +++ b/app/core/gimphistogram.c @@ -44,7 +44,6 @@ #include "gimpwaitable.h" -#define MAX_N_COMPONENTS 4 #define N_DERIVED_CHANNELS 2 #define PIXELS_PER_THREAD \ @@ -146,7 +145,7 @@ gimp_histogram_class_init (GimpHistogramClass *klass) g_object_class_install_property (object_class, PROP_N_COMPONENTS, g_param_spec_int ("n-components", NULL, NULL, - 0, MAX_N_COMPONENTS, 0, + 0, MAX_CHANNELS, 0, GIMP_PARAM_READABLE)); g_object_class_install_property (object_class, PROP_N_BINS,