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
This commit is contained in:
Ernestas Kulik 2017-03-30 22:29:57 +03:00 committed by Ernestas Kulik
parent 1202082b9d
commit fe1e53ad87

View File

@ -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);