1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-06 01:12:40 +02:00

plug-ins: Fix image-map grid type change

Resolves #10611.

In GTK3, GtkRadioButtons are set using the "active" property
rather than selected, so the callback needed to check the
GTK_STATE_FLAG_ACTIVE flag instead of GTK_STATE_FLAG_SELECTED
when changing grid types.
The code was also reformatted to match current coding style.
This commit is contained in:
Alx Sa
2024-01-09 02:54:09 +00:00
parent 45ea994e89
commit bbbf6df52d

View File

@@ -112,13 +112,14 @@ snap_toggled_cb (GtkWidget *widget,
}
static void
type_toggled_cb(GtkWidget *widget, gpointer data)
type_toggled_cb (GtkWidget *widget,
gpointer data)
{
if (gtk_widget_get_state_flags (widget) & GTK_STATE_FLAG_SELECTED)
{
grid_type = GPOINTER_TO_INT (data);
preview_redraw();
}
if (gtk_widget_get_state_flags (widget) & GTK_STATE_FLAG_ACTIVE)
{
grid_type = GPOINTER_TO_INT (data);
preview_redraw ();
}
}
static void