[gtk+/gtk-3-22] flowbox: don’t select when rubberbanding over nothing
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-22] flowbox: don’t select when rubberbanding over nothing
- Date: Fri, 31 Mar 2017 04:27:49 +0000 (UTC)
commit 69234066a4dff142d50944daa32748234debdebb
Author: Ernestas Kulik <ernestask gnome org>
Date: Thu Mar 30 22:29:57 2017 +0300
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
gtk/gtkflowbox.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c
index a6fcd1d..24af737 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -3139,7 +3139,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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]