app: reset the selected index when active palette changes.

This fixes some CRITICAL when switching active image while an item is selected.
This commit is contained in:
Jehan 2023-10-08 23:57:04 +02:00
parent 2a0f3b6340
commit c3c0a70dd5
1 changed files with 2 additions and 0 deletions

View File

@ -785,6 +785,8 @@ gimp_colormap_selection_set_palette (GimpColormapSelection *selection)
{
if (selection->active_palette)
{
gimp_colormap_selection_set_index (selection, 0, NULL);
g_signal_handlers_disconnect_by_func (selection->active_palette,
G_CALLBACK (gtk_widget_queue_draw),
selection);