diff options
author | Ernestas Kulik <ernestask@gnome.org> | 2017-03-30 22:29:57 +0300 |
---|---|---|
committer | Ernestas Kulik <ernestask@src.gnome.org> | 2017-03-31 07:24:15 +0300 |
commit | fe1e53ad87d168ed02470a3c10ab7f58663eb398 (patch) | |
tree | 5667b8a44a54a3375c41feb92500d0f27a50a552 /gtk/gtkflowbox.c | |
parent | 1202082b9d5aa9b64a9d3f85f3fe6f9a070e77e6 (diff) | |
download | gtk+-fe1e53ad87d168ed02470a3c10ab7f58663eb398.tar.gz |
flowbox: don’t select when rubberbanding over nothing
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
Diffstat (limited to 'gtk/gtkflowbox.c')
-rw-r--r-- | gtk/gtkflowbox.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); |