From: jprocter Date: Thu, 8 Nov 2012 17:45:43 +0000 (+0000) Subject: JAL-1193 ensure the 'loadedComplete' method gets called for all views X-Git-Tag: Release_2_8~2^2~9 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=de27c6a166ca3ab13bca0c02adca487dd99fa8de;p=jalview.git 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 --- 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; }