[gimp] app: be more accurate to ascertain in we are multi-selecting.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: be more accurate to ascertain in we are multi-selecting.
- Date: Sun, 13 Dec 2020 23:34:30 +0000 (UTC)
commit f5d9856125bae7fbac0214eced49d5dcc0105558
Author: Jehan <jehan girinstud io>
Date: Mon Dec 14 00:30:05 2020 +0100
app: be more accurate to ascertain in we are multi-selecting.
In particular, we should not check if the extend/modify (shift/ctrl)
modifiers are ON, but also that no other modifier is ON. For instance an
Alt-Shift-click should not trigger multi-selection actions, allowing it
to be useful for other actions without also changing the selection in
the same time.
app/widgets/gimpcontainertreeview.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/app/widgets/gimpcontainertreeview.c b/app/widgets/gimpcontainertreeview.c
index 9c42065ab7..522b3c88ba 100644
--- a/app/widgets/gimpcontainertreeview.c
+++ b/app/widgets/gimpcontainertreeview.c
@@ -1300,12 +1300,13 @@ gimp_container_tree_view_button (GtkWidget *widget,
GtkTreeIter iter;
gboolean handled = TRUE;
gboolean multisel_mode;
+ GdkModifierType modifiers = (bevent->state & gimp_get_all_modifiers_mask ());
multisel_mode = (gtk_tree_selection_get_mode (tree_view->priv->selection)
== GTK_SELECTION_MULTIPLE);
- if (! (bevent->state & (gimp_get_extend_selection_mask () |
- gimp_get_modify_selection_mask ())))
+ if (! modifiers ||
+ (modifiers & ~(gimp_get_extend_selection_mask () | gimp_get_modify_selection_mask ())))
{
/* don't chain up for multi-selection handling if none of
* the participating modifiers is pressed, we implement
@@ -1503,11 +1504,11 @@ gimp_container_tree_view_button (GtkWidget *widget,
path_str,
bevent->state);
- if (! handled && ! multisel_mode)
+ if (! handled && ! multisel_mode && ! modifiers)
{
if (! tree_view->priv->editing_path &&
(bevent->type == GDK_BUTTON_RELEASE ||
- ! gimp_container_view_is_item_selected (container_view, renderer->viewable)))
+ ! gimp_container_view_is_item_selected (container_view, renderer->viewable)))
/* If we click on currently selected item,
* handle simple click on release only for it
* to not change a multi-selection in case this
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]