PaintRefresher must be sent alignment
authoramwaterhouse <Andrew Waterhouse>
Tue, 14 Jun 2005 11:33:41 +0000 (11:33 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 14 Jun 2005 11:33:41 +0000 (11:33 +0000)
src/jalview/gui/AlignFrame.java

index ad350cc..5fe31da 100755 (executable)
@@ -563,7 +563,7 @@ public class AlignFrame
 \r
     sg.setEndRes(viewport.alignment.getWidth());\r
     viewport.setSelectionGroup(sg);\r
-    PaintRefresher.Refresh(null);\r
+    PaintRefresher.Refresh(null, viewport.alignment);\r
   }\r
 \r
   public void deselectAllSequenceMenuItem_actionPerformed(ActionEvent e)\r
@@ -571,12 +571,17 @@ public class AlignFrame
     viewport.setSelectionGroup(null);\r
     viewport.getColumnSelection().clear();\r
     viewport.setSelectionGroup(null);\r
-    PaintRefresher.Refresh(null);\r
+    PaintRefresher.Refresh(null, viewport.alignment);\r
   }\r
 \r
   public void invertSequenceMenuItem_actionPerformed(ActionEvent e)\r
   {\r
     SequenceGroup sg = viewport.getSelectionGroup();\r
+    if(sg==null)\r
+    {\r
+      selectAllSequenceMenuItem_actionPerformed(null);\r
+      return;\r
+    }\r
 \r
     for (int i = 0; i < viewport.getAlignment().getSequences().size();\r
          i++)\r
@@ -584,7 +589,7 @@ public class AlignFrame
       sg.addOrRemove(viewport.getAlignment().getSequenceAt(i), false);\r
     }\r
 \r
-    PaintRefresher.Refresh(null);\r
+    PaintRefresher.Refresh(null, viewport.alignment);\r
   }\r
 \r
   public void remove2LeftMenuItem_actionPerformed(ActionEvent e)\r