JAL-2089 patch broken merge to master for Release 2.10.0b1
[jalview.git] / src / jalview / gui / FeatureSettings.java
index 742ff8d..15f3e5b 100644 (file)
@@ -174,7 +174,7 @@ public class FeatureSettings extends JPanel implements
       public void mousePressed(MouseEvent evt)
       {
         selectedRow = table.rowAtPoint(evt.getPoint());
-        if (SwingUtilities.isRightMouseButton(evt))
+        if (evt.isPopupTrigger())
         {
           popupSort(selectedRow, (String) table.getValueAt(selectedRow, 0),
                   table.getValueAt(selectedRow, 1), fr.getMinMax(),
@@ -183,16 +183,15 @@ public class FeatureSettings extends JPanel implements
         else if (evt.getClickCount() == 2)
         {
           boolean invertSelection = evt.isAltDown();
-          boolean ctrlDown = Platform.isControlDown(evt);
-          boolean toggleSelection = ctrlDown;
-          boolean extendSelection = evt.isShiftDown() || ctrlDown;
+          boolean toggleSelection = Platform.isControlDown(evt);
+          boolean extendSelection = evt.isShiftDown();
           fr.ap.alignFrame.avc.markColumnsContainingFeatures(
                   invertSelection, extendSelection, toggleSelection,
                   (String) table.getValueAt(selectedRow, 0));
         }
       }
 
-      // isPopupTrigger fires on mouseReleased on Mac
+      // isPopupTrigger fires on mouseReleased on Windows
       @Override
       public void mouseReleased(MouseEvent evt)
       {
@@ -819,8 +818,8 @@ public class FeatureSettings extends JPanel implements
           }
           else
           {
-            Color color = new Color(
-                    Integer.parseInt(jucs.getColour(i).getRGB(), 16));
+            Color color = new Color(Integer.parseInt(jucs.getColour(i)
+                    .getRGB(), 16));
             fr.setColour(name = jucs.getColour(i).getName(),
                     new FeatureColour(color));
           }
@@ -845,8 +844,7 @@ public class FeatureSettings extends JPanel implements
   void save()
   {
     JalviewFileChooser chooser = new JalviewFileChooser(
-            Cache.getProperty("LAST_DIRECTORY"),
-            new String[] { "fc" },
+            Cache.getProperty("LAST_DIRECTORY"), new String[] { "fc" },
             new String[] { "Sequence Feature Colours" },
             "Sequence Feature Colours");
     chooser.setFileView(new jalview.io.JalviewFileView());