groups[i].setStart(sg.getStartRes());\r
groups[i].setEnd(sg.getEndRes());\r
groups[i].setName(sg.getName());\r
-\r
- if (sg.cs.conservationApplied())\r
+ if(sg.cs!=null)\r
{\r
- groups[i].setConsThreshold(sg.cs.getConservationInc());\r
+ if (sg.cs.conservationApplied())\r
+ {\r
+ groups[i].setConsThreshold(sg.cs.getConservationInc());\r
\r
- if (sg.cs instanceof jalview.schemes.UserColourScheme)\r
+ if (sg.cs instanceof jalview.schemes.UserColourScheme)\r
+ {\r
+ groups[i].setColour(SetUserColourScheme(sg.cs,\r
+ userColours,\r
+ jms));\r
+ }\r
+ else\r
+ {\r
+ groups[i].setColour(ColourSchemeProperty.getColourName(sg.\r
+ cs));\r
+ }\r
+ }\r
+ else if (sg.cs instanceof jalview.schemes.UserColourScheme)\r
{\r
groups[i].setColour(SetUserColourScheme(sg.cs, userColours,\r
- jms));\r
+ jms));\r
}\r
else\r
{\r
- groups[i].setColour(ColourSchemeProperty.getColourName(sg.cs));\r
+ groups[i].setColour(ColourSchemeProperty.getColourName(\r
+ sg.cs));\r
}\r
- }\r
\r
- else if (sg.cs instanceof jalview.schemes.UserColourScheme)\r
- {\r
- groups[i].setColour(SetUserColourScheme(sg.cs, userColours,\r
- jms));\r
- }\r
- else\r
- {\r
- groups[i].setColour(ColourSchemeProperty.getColourName(\r
- sg.cs));\r
+ groups[i].setPidThreshold(sg.cs.getThreshold());\r
}\r
\r
-\r
- groups[i].setPidThreshold( sg.cs.getThreshold() );\r
-\r
groups[i].setOutlineColour(sg.getOutlineColour().getRGB());\r
groups[i].setDisplayBoxes(sg.getDisplayBoxes());\r
groups[i].setDisplayText(sg.getDisplayText());\r
\r
ColourSchemeI cs = av.getGlobalColourScheme();\r
\r
- if (cs.conservationApplied())\r
+ if(cs!=null)\r
{\r
+ if (cs.conservationApplied())\r
+ {\r
view.setConsThreshold(cs.getConservationInc());\r
- if(cs instanceof jalview.schemes.UserColourScheme)\r
+ if (cs instanceof jalview.schemes.UserColourScheme)\r
view.setBgColour(SetUserColourScheme(cs, userColours, jms));\r
- }\r
+ }\r
\r
- if (cs instanceof ResidueColourScheme)\r
- {\r
- view.setPidThreshold( cs.getThreshold() );\r
+ if (cs instanceof ResidueColourScheme)\r
+ {\r
+ view.setPidThreshold(cs.getThreshold());\r
+ }\r
}\r
\r
view.setConservationSelected(av.getConservationSelected());\r
}\r
}\r
\r
- Desktop.addInternalFrame(af, view.getTitle(),\r
- AlignFrame.NEW_WINDOW_WIDTH, AlignFrame.NEW_WINDOW_HEIGHT);\r
+\r
af.setBounds(view.getXpos(), view.getYpos(), view.getWidth(),\r
view.getHeight());\r
af.viewport.setStartRes(view.getStartRes());\r
cs = ColourSchemeProperty.getColour(al, view.getBgColour());\r
}\r
\r
- cs.setThreshold(view.getPidThreshold(), true);\r
-\r
if(cs!=null)\r
+ {\r
+ cs.setThreshold(view.getPidThreshold(), true);\r
cs.setConsensus(af.viewport.vconsensus);\r
+ }\r
}\r
\r
af.setColourSelected(view.getBgColour());\r
af.viewport.setGlobalColourScheme(cs);\r
af.viewport.setColourAppliesToAllGroups(false);\r
- af.changeColour(af.viewport.getGlobalColourScheme());\r
- if (view.getConservationSelected())\r
+ af.changeColour(cs);\r
+ if (view.getConservationSelected() && cs!=null)\r
{\r
- af.viewport.getGlobalColourScheme().setConservationInc(view.getConsThreshold());\r
+ cs.setConservationInc(view.getConsThreshold());\r
}\r
\r
af.viewport.setColourAppliesToAllGroups(true);\r
if (tree.getCurrentTree())\r
af.viewport.setCurrentTree(tp.getTree());\r
}\r
+\r
}\r
catch (Exception ex)\r
{\r
ex.printStackTrace();\r
}\r
+\r
}\r
+\r
+ Desktop.addInternalFrame(af, view.getTitle(),\r
+ AlignFrame.NEW_WINDOW_WIDTH, AlignFrame.NEW_WINDOW_HEIGHT);\r
+\r
return af;\r
}\r
}\r