}
}
+ /*
+ * isPopupTrigger fires in mousePressed on Mac,
+ * not until mouseRelease on Windows
+ */
if (evt.isPopupTrigger() && activeRow != -1)
{
showPopupMenu(y, evt.getX());
import jalview.datamodel.SequenceI;
import jalview.io.SequenceAnnotationReport;
import jalview.util.MessageManager;
+import jalview.util.Platform;
import jalview.util.UrlLink;
import jalview.viewmodel.AlignmentViewport;
return;
}
+ /*
+ * defer right-mouse click handling to mouse up on Mac
+ * (where isPopupTrigger() will answer true)
+ */
+ if (SwingUtilities.isRightMouseButton(e) && !Platform.isAMac())
+ {
+ return;
+ }
if ((av.getSelectionGroup() == null)
|| (!jalview.util.Platform.isControlDown(e)
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
+import javax.swing.SwingUtilities;
import javax.swing.ToolTipManager;
/**
@Override
public void mousePressed(MouseEvent evt)
{
+ /*
+ * defer right-mouse click handling to mouse up on Mac
+ * (where isPopupTrigger() will answer true)
+ */
+ if (SwingUtilities.isRightMouseButton(evt) && !Platform.isAMac())
+ {
+ return;
+ }
+
int x = (evt.getX() / av.getCharWidth()) + av.getStartRes();
final int res;
*/
protected void leftMouseButtonPressed(MouseEvent evt, final int res)
{
+ /*
+ * Ctrl-click/Cmd-click adds to the selection
+ * Shift-click extends the selection
+ */
+ // TODO Problem: right-click on Windows not reported until mouseReleased?!?
if (!Platform.isControlDown(evt) && !evt.isShiftDown())
{
av.getColumnSelection().clear();