[gimp] app: do not popup a viewable preview when modifiers are active.



commit 305dcdccccd280bafb462b60333d5e24ea9d6b0f
Author: Jehan <jehan girinstud io>
Date:   Sun Dec 13 20:39:47 2020 +0100

    app: do not popup a viewable preview when modifiers are active.
    
    Long press on a viewable cell (such as the small layer or mask preview)
    pops up a slightly bigger preview. We don't want this feature to be
    triggered when any modifier is active, such as ctrl/shift (common with
    multi selection in a tree view) or alt combinations (for various
    alternative actions).

 app/widgets/gimpcellrendererviewable.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/app/widgets/gimpcellrendererviewable.c b/app/widgets/gimpcellrendererviewable.c
index 6e9408dd78..07b6911c22 100644
--- a/app/widgets/gimpcellrendererviewable.c
+++ b/app/widgets/gimpcellrendererviewable.c
@@ -383,9 +383,11 @@ gimp_cell_renderer_viewable_clicked (GimpCellRendererViewable *cell,
 
       if (event)
         {
-          GdkEventButton *bevent = (GdkEventButton *) event;
+          GdkEventButton  *bevent    = (GdkEventButton *) event;
+          GdkModifierType  modifiers = gtk_accelerator_get_default_mod_mask ();
 
           if (bevent->type == GDK_BUTTON_PRESS &&
+              (bevent->state & modifiers) == 0 &&
               (bevent->button == 1 || bevent->button == 2))
             {
               gimp_view_popup_show (gtk_get_event_widget (event),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]