From c2f87513d6482ea544d619fedc516cd85c8da1d0 Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Mon, 9 Mar 2026 10:26:46 +0000 Subject: [PATCH] app/tools: Fix ordering of selection mode options In 046c8f27, we added a new function gimp_selection_options_get_mode_box () so that the Paint Select tool would use the same enum as other selection tools. Code was added to move the GIMP_CHANNEL_OP_REPLACE enum to the front only if it was greater than the min value and less than the max value that was passed in. This was to allow the Paint Select tool to keep GIMP_CHANNEL_OP_ADD at the front while leaving the other selection tools as they are. However, the original call used 0, 0 for those values, so the rearrangement code never ran at all. This patch changes the parameter max value to GIMP_CHANNEL_OP_INTERSECT so that Replace is moved for non-Paint Select tools. --- app/tools/gimpselectionoptions.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/tools/gimpselectionoptions.c b/app/tools/gimpselectionoptions.c index a9666183c7..75ff3459cc 100644 --- a/app/tools/gimpselectionoptions.c +++ b/app/tools/gimpselectionoptions.c @@ -187,7 +187,9 @@ gimp_selection_options_gui (GimpToolOptions *tool_options) GtkWidget *mode_box; /* the selection operation radio buttons */ - mode_box = gimp_selection_options_get_mode_box (tool_options, 0, 0); + mode_box = gimp_selection_options_get_mode_box (tool_options, + GIMP_CHANNEL_OP_ADD, + GIMP_CHANNEL_OP_INTERSECT); gtk_box_pack_start (GTK_BOX (vbox), mode_box, FALSE, FALSE, 0); gtk_widget_show (mode_box); options->mode_box = mode_box;