From de27c6a166ca3ab13bca0c02adca487dd99fa8de Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 8 Nov 2012 17:45:43 +0000 Subject: [PATCH] JAL-1193 ensure the 'loadedComplete' method gets called for all views after the views have been opened by using the Swing stack as a queue --- src/jalview/gui/Jalview2XML.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index 3459fc8..e88b190 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -1678,12 +1678,27 @@ public class Jalview2XML jarInputStreamProvider jprovider = createjarInputStreamProvider(file); af = LoadJalviewAlign(jprovider); - setLoadingFinishedForNewStructureViewers(); + } catch (MalformedURLException e) { errorMessage = "Invalid URL format for '" + file + "'"; reportErrors(); } + finally { + try + { + SwingUtilities.invokeAndWait(new Runnable() + { + public void run() + { + setLoadingFinishedForNewStructureViewers(); + }; + }); + } catch (Exception x) + { + + } + } return af; } -- 1.7.10.2