JAL-3048 use FileParse to transfer File to NewickFile parser
authorJim Procter <jprocter@issues.jalview.org>
Fri, 29 Jun 2018 16:14:21 +0000 (17:14 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Fri, 29 Jun 2018 16:14:21 +0000 (17:14 +0100)
src/jalview/gui/AlignFrame.java

index dafeafc..4695ed7 100644 (file)
@@ -3926,7 +3926,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
                 NewickFile fin = null;
                 try
                 {
-                  fin = new NewickFile(filePath, DataSourceType.FILE);
+                  fin = new NewickFile(new FileParse(
+                          chooser.getSelectedFile(), DataSourceType.FILE));
                   viewport.setCurrentTree(
                           showNewickTree(fin, filePath).getTree());
                 } catch (Exception ex)