frefedSequence = new Vector();
}
- jalview.gui.AlignFrame af = null;
+ jalview.gui.AlignFrame af= null,_af = null;
Hashtable gatherToThisFrame = new Hashtable();
final String file = jprovider.getFilename();
try
object = (JalviewModel) unmar.unmarshal(in);
if (true) // !skipViewport(object))
{
- af = LoadFromObject(object, file, true, jprovider);
- if (af.viewport.gatherViewsHere)
+ _af = LoadFromObject(object, file, true, jprovider);
+ if (object.getJalviewModelSequence().getViewportCount() > 0)
{
- gatherToThisFrame.put(af.viewport.getSequenceSetId(), af);
+ af = _af;
+ if (object.getJalviewModelSequence().getViewportCount() > 1
+ && af.viewport.gatherViewsHere)
+ {
+ gatherToThisFrame.put(af.viewport.getSequenceSetId(), af);
+ }
}
}
entryCount++;
JalviewModelSequence jms = object.getJalviewModelSequence();
- Viewport view = jms.getViewport(0);
+ Viewport view = (jms.getViewportCount()>0) ? jms.getViewport(0) : null;
+
// ////////////////////////////////
// LOAD SEQUENCES
}
}
-
+ if (view==null)
+ {
+ // only dataset in this model, so just return.
+ return null;
+ }
// ///////////////////////////////
// LOAD VIEWPORT