[gtk/wip/baedert/for-master: 13/29] checkbutton: Fix clicking on the last group member




commit 591b52584e9980a718e011e37386679815769747
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Aug 30 18:19:05 2020 -0400

    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.

 gtk/gtkcheckbutton.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c
index ac087f5079..f9ba214ddd 100644
--- a/gtk/gtkcheckbutton.c
+++ b/gtk/gtkcheckbutton.c
@@ -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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]