checkbutton: Fix clicking on the last group member

Clicking on the last group member was letting me
uncheck it, creating a radio group without active
item, which is not what we want.
This commit is contained in:
Matthias Clasen 2020-08-30 18:19:05 -04:00
parent f30d32f609
commit 591b52584e

View File

@ -264,7 +264,7 @@ click_released_cb (GtkGestureClick *gesture,
GtkCheckButton *self = GTK_CHECK_BUTTON (widget);
GtkCheckButtonPrivate *priv = gtk_check_button_get_instance_private (self);
if (priv->active && priv->group_prev)
if (priv->active && (priv->group_prev || priv->group_next))
return;
gtk_check_button_set_active (self, !priv->active);