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).
This commit is contained in:
Jehan 2020-12-13 20:39:47 +01:00
parent dfc4ecfc4c
commit 305dcdcccc
1 changed files with 3 additions and 1 deletions

View File

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