checkbutton: Delegate ::activate to the helper if appropriate

If the button is associated with an action, the action is currently
only activated when the button is clicked, not when it is activated.
This commit is contained in:
Florian Müllner 2021-07-30 07:40:48 +02:00
parent 06348a8517
commit c50475de34

View File

@ -498,7 +498,10 @@ gtk_check_button_real_activate (GtkCheckButton *self)
if (priv->active && (priv->group_prev || priv->group_next))
return;
gtk_check_button_set_active (self, !gtk_check_button_get_active (self));
if (priv->action_helper)
gtk_action_helper_activate (priv->action_helper);
else
gtk_check_button_set_active (self, !gtk_check_button_get_active (self));
}
static void