break;\r
case KeyEvent.VK_H:\r
{\r
- SequenceGroup sg = viewport.getSelectionGroup();\r
+ boolean toggleSeqs = !evt.isControlDown();\r
+ boolean toggleCols = !evt.isAltDown();\r
boolean hide = false;\r
- if (sg != null && sg.getSize(false) != viewport.alignment.getHeight())\r
+ SequenceGroup sg = viewport.getSelectionGroup();\r
+\r
+ if(toggleSeqs)\r
{\r
- hide = true;\r
- viewport.hideAllSelectedSeqs();\r
+ if (sg != null && sg.getSize(false) != viewport.alignment.getHeight())\r
+ {\r
+ hide = true;\r
+ viewport.hideAllSelectedSeqs();\r
+ }\r
+ else\r
+ viewport.showAllHiddenSeqs();\r
}\r
- else if (viewport.colSel.getSelected().size() < 1)\r
- viewport.showAllHiddenSeqs();\r
\r
- if (viewport.colSel.getSelected().size() > 0)\r
- viewport.hideSelectedColumns();\r
- else if (!hide)\r
- viewport.showAllHiddenColumns();\r
+ if(toggleCols)\r
+ {\r
+ if (viewport.colSel.getSelected().size() > 0)\r
+ viewport.hideSelectedColumns();\r
+ else if (!hide)\r
+ viewport.showAllHiddenColumns();\r
+ }\r
\r
alignPanel.repaint();\r
break;\r
break;\r
case KeyEvent.VK_H:\r
{\r
- SequenceGroup sg = av.getSelectionGroup();\r
+ boolean toggleSeqs = !evt.isControlDown();\r
+ boolean toggleCols = !evt.isAltDown();\r
boolean hide = false;\r
- if(sg!=null && sg.getSize(false)!=av.alignment.getHeight())\r
- {\r
- hide = true;\r
- alignFrame.hideSelSequences_actionPerformed(null);\r
- }\r
- else if(av.colSel.getSelected().size()<1)\r
- alignFrame.showAllSeqs_actionPerformed(null);\r
-\r
- if(av.colSel.getSelected().size()>0)\r
- alignFrame.hideSelColumns_actionPerformed(null);\r
- else if(!hide)\r
- alignFrame.showAllColumns_actionPerformed(null);\r
\r
+ SequenceGroup sg = av.getSelectionGroup();\r
+ if(toggleSeqs)\r
+ {\r
+ if(sg != null && sg.getSize(false) != av.alignment.getHeight())\r
+ {\r
+ alignFrame.hideSelSequences_actionPerformed(null);\r
+ hide = true;\r
+ }\r
+ else\r
+ alignFrame.showAllSeqs_actionPerformed(null);\r
+ }\r
+\r
+ if (toggleCols)\r
+ {\r
+ if(av.colSel.getSelected().size() > 0)\r
+ alignFrame.hideSelColumns_actionPerformed(null);\r
+ else if(!hide)\r
+ alignFrame.showAllColumns_actionPerformed(null);\r
+ }\r
break;\r
}\r
\r