libgimpwidgets: make sure that the selected channel is in sync with reality.

By default, the GimpColorSelect widget is set to show HSV with Hue
selected but we weren't selecting the channel which was defaulting to
"Red" of RGB. Therefore there was some inconsistency when first opening
the color selection dialog which was showing HSV colors on the left, yet
with "Red" selected on the right.

This fixes the inconsistency, which also allows parent or container code
to set the default they want (which is indeed RGB).
This commit is contained in:
Jehan 2024-10-09 20:52:28 +02:00
parent b1616cfaaf
commit abf0c1c272

View file

@ -530,6 +530,11 @@ gimp_color_select_init (GimpColorSelect *select)
g_type_class_unref (model_class);
g_type_class_unref (channel_class);
/* See z_color_fill and xy_color_fill values at top of the init()
* function. Make sure the GimpColorSelector code is not out-of-sync.
*/
gimp_color_selector_set_channel (selector, GIMP_COLOR_SELECTOR_HUE);
}
static void