JAL-3441 action double-click in Feature Type column only
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 26 Sep 2019 13:59:23 +0000 (14:59 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 26 Sep 2019 13:59:23 +0000 (14:59 +0100)
src/jalview/gui/FeatureSettings.java

index 441dca7..11d5e39 100644 (file)
@@ -282,7 +282,8 @@ public class FeatureSettings extends JPanel
       @Override
       public void mousePressed(MouseEvent evt)
       {
-        selectedRow = table.rowAtPoint(evt.getPoint());
+        Point pt = evt.getPoint();
+        selectedRow = table.rowAtPoint(pt);
         String type = (String) table.getValueAt(selectedRow, TYPE_COLUMN);
         if (evt.isPopupTrigger())
         {
@@ -290,7 +291,8 @@ public class FeatureSettings extends JPanel
           popupSort(selectedRow, type, colour, fr.getMinMax(), evt.getX(),
                   evt.getY());
         }
-        else if (evt.getClickCount() == 2)
+        else if (evt.getClickCount() == 2
+                && table.columnAtPoint(pt) == TYPE_COLUMN)
         {
           boolean invertSelection = evt.isAltDown();
           boolean toggleSelection = Platform.isControlDown(evt);