From fe1e53ad87d168ed02470a3c10ab7f58663eb398 Mon Sep 17 00:00:00 2001 From: Ernestas Kulik Date: Thu, 30 Mar 2017 22:29:57 +0300 Subject: [PATCH] =?UTF-8?q?flowbox:=20don=E2=80=99t=20select=20when=20rubb?= =?UTF-8?q?erbanding=20over=20nothing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When rubberbanding over an empty area, everything is selected on gesture end, which is a bit counter-intuitive. https://bugzilla.gnome.org/show_bug.cgi?id=780735 --- gtk/gtkflowbox.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c index bd73e43d29..6bb31a0621 100644 --- a/gtk/gtkflowbox.c +++ b/gtk/gtkflowbox.c @@ -2996,7 +2996,9 @@ gtk_flow_box_drag_gesture_end (GtkGestureDrag *gesture, if (!priv->rubberband_extend && !priv->rubberband_modify) gtk_flow_box_unselect_all_internal (box); - gtk_flow_box_select_all_between (box, priv->rubberband_first, priv->rubberband_last, priv->rubberband_modify); + if (priv->rubberband_first && priv->rubberband_last) + gtk_flow_box_select_all_between (box, priv->rubberband_first, priv->rubberband_last, priv->rubberband_modify); + gtk_flow_box_stop_rubberband (box); g_signal_emit (box, signals[SELECTED_CHILDREN_CHANGED], 0);