From 8e48269e6c938df4df9a91c11f101fbfa5e61a8a Mon Sep 17 00:00:00 2001 From: Albert Cardona Date: Mon, 13 Apr 2009 20:02:18 +0200 Subject: [PATCH] Utils.isPopupTrigger now uses the same trickery as ij.gui.ImageCanvas --- ini/trakem2/utils/Utils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ini/trakem2/utils/Utils.java b/ini/trakem2/utils/Utils.java index 05ec2c57..fd578bb4 100644 --- a/ini/trakem2/utils/Utils.java +++ b/ini/trakem2/utils/Utils.java @@ -942,7 +942,9 @@ public class Utils implements ij.plugin.PlugIn { /** OS-agnostic diagnosis of whether the click was for the contextual popup menu. */ static public final boolean isPopupTrigger(final MouseEvent me) { - return me.isPopupTrigger() || 0 != (me.getModifiers() & Event.META_MASK); + //return me.isPopupTrigger() || 0 != (me.getModifiers() & Event.META_MASK); + // ImageJ way, in ij.gui.ImageCanvas class: + return (me.isPopupTrigger() && me.getButton() != 0) || 0 != (me.getModifiers() & Event.META_MASK); } /** Repaint the given Component on the swing repaint thread (aka "SwingUtilities.invokeLater"). */ -- 2.11.4.GIT