state.setAlignwithAlignPanel(jmol.isUsedforaligment(ap));
state.setColourwithAlignPanel(jmol
.isUsedforcolourby(ap));
+ state.setColourByJmol(jmol.isColouredByJmol());
if (!jmolViewIds.contains(state.getViewId()))
{
// Make sure we only store a Jmol state once in each XML
{ new int[]
{ x, y, width, height }, "",
new Hashtable<String, Object[]>(), new boolean[]
- { false, false } });
+ { false, false, true } });
// Legacy pre-2.7 conversion JAL-823 :
// do not assume any view has to be linked for colour by sequence
}
.hasColourwithAlignPanel() ? ids[p]
.getStructureState(s).getColourwithAlignPanel()
: false;
+ // default for pre-2.7 projects is that Jmol colouring is enabled
+ ((boolean[])jmoldat[3])[2] &=ids[p].getStructureState(s).hasColourByJmol() ? ids[p].getStructureState(s).getColourByJmol() : true;
if (((String) jmoldat[1]).length() < ids[p]
.getStructureState(s).getContent().length())
int[] geom = (int[]) svattrib[0];
String state = (String) svattrib[1];
Hashtable<String, Object[]> oldFiles = (Hashtable<String, Object[]>) svattrib[2];
- final boolean useinJmolsuperpos = ((boolean[]) svattrib[3])[0], usetoColourbyseq = ((boolean[]) svattrib[3])[1];
+ final boolean useinJmolsuperpos = ((boolean[]) svattrib[3])[0], usetoColourbyseq = ((boolean[]) svattrib[3])[1], jmolColouring=((boolean[])svattrib[3])[2];
int x = geom[0], y = geom[1], width = geom[2], height = geom[3];
// collate the pdbfile -> sequence mappings from this view
Vector<String> pdbfilenames = new Vector<String>();
try
{
sview = new AppJmol(pdbf, id, sq, alf.alignPanel,
- useinJmolsuperpos, usetoColourbyseq, fileloc,
+ useinJmolsuperpos, usetoColourbyseq, jmolColouring, fileloc,
rect, vid);
} catch (OutOfMemoryError ex)
{
}
if (usetoColourbyseq)
{
- ((AppJmol) comp).useAlignmentPanelForColourbyseq(ap);
+ ((AppJmol) comp).useAlignmentPanelForColourbyseq(ap, !jmolColouring);
}
else
{