From 77c35fa912621cbadcf5ec74da4c6d45de6322e1 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Wed, 7 Feb 2007 11:29:38 +0000 Subject: [PATCH] reload, just close this frame and open a new one --- src/jalview/gui/AlignFrame.java | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 3f26ca8..08c1aa9 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -578,30 +578,17 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener } else { - viewport.alignment.deleteAllGroups(); - viewport.sequenceColours=null; - while (viewport.alignment.getHeight() > 0) - { - viewport.alignment.deleteSequence(0); - } + Rectangle bounds = this.getBounds(); - viewport.historyList.clear(); - viewport.redoList.clear(); - Alignment dset = viewport.alignment.getDataset(); - while (dset.getHeight() > 0) - { - dset.deleteSequence(0); - } + FileLoader loader = new FileLoader(); + String protocol = fileName.startsWith("http:") ? "URL" : "File"; + AlignFrame newframe = + loader.LoadFileWaitTillLoaded(fileName, protocol, currentFileFormat); - firePropertyChange("Alignment", null, viewport.alignment.getSequences()); + newframe.setBounds(bounds); - updateEditMenuBar(); + this.closeMenuItem_actionPerformed(true); } - - FileLoader loader = new FileLoader(); - String protocol = fileName.startsWith("http:")? "URL":"File"; - loader.LoadFile(viewport, fileName, protocol, currentFileFormat); - } } -- 1.7.10.2