[gimp] app: catch Alt-click exact combination on GimpItemTreeView preview.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: catch Alt-click exact combination on GimpItemTreeView preview.
- Date: Sun, 13 Dec 2020 23:41:45 +0000 (UTC)
commit 14b4c08881fd3aea35b3bae5dce339ca7e308169
Author: Jehan <jehan girinstud io>
Date: Mon Dec 14 00:37:24 2020 +0100
app: catch Alt-click exact combination on GimpItemTreeView preview.
When Alt-clicking on an item thumbnail (for instance a layer thumbnail),
we can trigger an "Alpha to Selection" action on the clicked item. Yet
the check was not accurate and would work on Alt+any modifier(s)+click.
Let's catch exactly Alt-click only in order to allow for more actions on
other combinations.
app/widgets/gimpitemtreeview.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/app/widgets/gimpitemtreeview.c b/app/widgets/gimpitemtreeview.c
index c855bd37ee..e9793d031a 100644
--- a/app/widgets/gimpitemtreeview.c
+++ b/app/widgets/gimpitemtreeview.c
@@ -1783,12 +1783,13 @@ gimp_item_tree_view_item_pre_clicked (GimpCellRendererViewable *cell,
GimpContainerTreeView *tree_view = GIMP_CONTAINER_TREE_VIEW (item_view);
GtkTreePath *path;
GtkTreeIter iter;
- gboolean handled = FALSE;
+ GdkModifierType modifiers = gimp_get_all_modifiers_mask ();
+ gboolean handled = FALSE;
path = gtk_tree_path_new_from_string (path_str);
if (gtk_tree_model_get_iter (tree_view->model, &iter, path) &&
- (state & GDK_MOD1_MASK))
+ (state & modifiers) == GDK_MOD1_MASK)
{
GimpImage *image = gimp_item_tree_view_get_image (item_view);
GimpViewRenderer *renderer = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]