From 4ccbae670700a44f5410827bf41f127f21cc1d97 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Thu, 5 Apr 2007 11:22:05 +0000 Subject: [PATCH] Pasted file doesnt have title and not reloadable --- src/jalview/io/FileLoader.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/jalview/io/FileLoader.java b/src/jalview/io/FileLoader.java index 86c1cf4..4177eab 100755 --- a/src/jalview/io/FileLoader.java +++ b/src/jalview/io/FileLoader.java @@ -125,6 +125,9 @@ public class FileLoader public void run() { + String title = protocol.equals(AppletFormatAdapter.PASTE) + ? "Copied From Clipboard" : file; + try { if (Desktop.instance != null) @@ -172,10 +175,12 @@ public class FileLoader AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT); - alignFrame.statusBar.setText("Successfully loaded file " + file); - alignFrame.setFileName(file, format); + alignFrame.statusBar.setText("Successfully loaded file " + title); + + if (!protocol.equals(AppletFormatAdapter.PASTE)) + alignFrame.setFileName(file, format); - Desktop.addInternalFrame(alignFrame, file, + Desktop.addInternalFrame(alignFrame, title, AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT); @@ -196,7 +201,7 @@ public class FileLoader Desktop.instance.stopLoading(); } - final String errorMessage = "Couldn't load file " + file + "\n" + + final String errorMessage = "Couldn't load file " + title + "\n" + error; javax.swing.SwingUtilities.invokeLater(new Runnable() -- 1.7.10.2