}
});
- TreeLoader tl = new TreeLoader(newTree);
- if (inputData != null)
- {
- tl.odata = inputData;
- }
+ TreeLoader tl = new TreeLoader(newTree, inputData);
tl.start();
}
class TreeLoader extends Thread
{
- NewickFile newtree;
+ private NewickFile newtree;
- AlignmentView odata = null;
+ private AlignmentView odata = null;
- public TreeLoader(NewickFile newickFile)
+ public TreeLoader(NewickFile newickFile, AlignmentView inputData)
{
this.newtree = newickFile;
+ this.odata = inputData;
+
if (newickFile != null)
{
// Must be outside run(), as Jalview2XML tries to
if (newtree != null)
{
- if (odata == null)
+ tree = new TreeModel(av.getAlignment().getSequencesArray(), odata,
+ newtree);
+ if (tree.getOriginalData() == null)
{
- tree = new TreeModel(av.getAlignment().getSequencesArray(),
- newtree);
- }
- else
- {
- tree = new TreeModel(av.getAlignment().getSequencesArray(),
- odata, newtree);
- }
- if (!tree.hasOriginalSequenceData())
- {
- allowOriginalSeqData(false);
+ originalSeqData.setVisible(false);
}
}
else
treeCanvas.setMarkPlaceholders(b);
}
- private void allowOriginalSeqData(boolean b)
- {
- originalSeqData.setVisible(b);
- }
-
/**
* DOCUMENT ME!
*
@Override
public void originalSeqData_actionPerformed(ActionEvent e)
{
- if (!tree.hasOriginalSequenceData())
+ AlignmentView originalData = tree.getOriginalData();
+ if (originalData == null)
{
jalview.bin.Cache.log
.info("Unexpected call to originalSeqData_actionPerformed - should have hidden this menu action.");
} catch (Exception ex)
{
}
- ;
- Object[] alAndColsel = tree.seqData.getAlignmentAndColumnSelection(gc);
+
+ Object[] alAndColsel = originalData
+ .getAlignmentAndColumnSelection(gc);
if (alAndColsel != null && alAndColsel[0] != null)
{