void refresh()\r
{\r
SequenceGroup sg = getGroup();\r
- SuperGroup superG = ap.av.alignment.getSuperGroup(sg);\r
- if (superG != null)\r
+ if(sg!=null)\r
{\r
- superG.setSuperGroupProperties(sg);\r
- }\r
+ SuperGroup superG = ap.av.alignment.getSuperGroup(sg);\r
\r
+ if (superG != null)\r
+ {\r
+ superG.setSuperGroupProperties(sg);\r
+ }\r
+ }\r
ap.seqPanel.seqCanvas.repaint();\r
}\r
\r
SequenceGroup sg = ap.av.getSelectionGroup();\r
\r
// this method won't add a new group if it already exists\r
- ap.av.alignment.addGroup(sg);\r
+ if(sg!=null)\r
+ ap.av.alignment.addGroup(sg);\r
\r
return sg;\r
}\r
void refresh()\r
{\r
SequenceGroup sg = getGroup();\r
- SuperGroup superG = ap.av.alignment.getSuperGroup(sg);\r
-\r
- if (superG != null)\r
+ if(sg!=null)\r
{\r
+ SuperGroup superG = ap.av.alignment.getSuperGroup(sg);\r
+\r
+ if (superG != null)\r
+ {\r
superG.setSuperGroupProperties(sg);\r
+ }\r
}\r
-\r
ap.seqPanel.repaint();\r
}\r
\r
SequenceGroup getGroup()\r
{\r
SequenceGroup sg = ap.av.getSelectionGroup();\r
-\r
- // this method won't add a new group if it already exists\r
- ap.av.alignment.addGroup(sg);\r
+ // this method won't add a new group if it already exists\r
+ if(sg!=null)\r
+ ap.av.alignment.addGroup(sg);\r
\r
return sg;\r
}\r