New feature type, new colour set
[jalview.git] / src / jalview / gui / AlignViewport.java
index b609417..fb2047e 100755 (executable)
@@ -118,7 +118,7 @@ public class AlignViewport
     Color textColour = Color.black;
     Color textColour2 = Color.white;
 
-    boolean idsAlignRight = false;
+    boolean rightAlignIds = false;
 
 
     /**
@@ -158,6 +158,8 @@ public class AlignViewport
       showJVSuffix = Cache.getDefault("SHOW_JVSUFFIX", true);
       showAnnotation = Cache.getDefault("SHOW_ANNOTATIONS", true);
 
+      rightAlignIds = Cache.getDefault("RIGHT_ALIGN_IDS", false);
+
       autoCalculateConsensus = Cache.getDefault("AUTO_CALC_CONSENSUS", true);
 
       padGaps = Cache.getDefault("PAD_GAPS", true);
@@ -1344,15 +1346,17 @@ public class AlignViewport
 
     public void invertColumnSelection()
     {
-      int column;
       for(int i=0; i<alignment.getWidth(); i++)
       {
-        column = i;
-
-        if(colSel.contains(column))
-          colSel.removeElement(column);
+        if(colSel.contains(i))
+          colSel.removeElement(i);
         else
-          colSel.addElement(column);
+        {
+          if (!hasHiddenColumns || colSel.isVisible(i))
+          {
+            colSel.addElement(i);
+          }
+        }
 
       }