JAL-3322 Once background displayed, allow asynchronous progress setting
[jalview.git] / getdown / src / getdown / launcher / src / main / java / com / threerings / getdown / launcher / Getdown.java
index ba238de..f64959b 100644 (file)
@@ -1124,16 +1124,18 @@ public abstract class Getdown extends Thread
       } catch (Exception e) {
         log.warning("Could't read config when invoking GUI action", "Exception", e.getMessage());
       }
-      if (_ifc != null && _ifc.progressSync) {
+      if (_ifc != null && (_shownContainer?_ifc.progressSyncAfterShown:_ifc.progressSync)) {
         try {
           EventQueue.invokeAndWait(r);
           //r.run();
+          log.warning("INVOKEANDWAIT", "shownContainer", _shownContainer);
         } catch (Exception e) {
           log.warning("Tried to invokeAndWait but couldn't. Going to invokeLater instead", "Exception", e.getMessage());
           EventQueue.invokeLater(r);
         }
       } else {
         EventQueue.invokeLater(r);
+        log.warning("INVOKELATER", "ifc", _ifc, "shownContainer", _shownContainer);
         //r.run();
       }
       
@@ -1159,13 +1161,15 @@ public abstract class Getdown extends Thread
     protected boolean _launchInSilent;
     protected boolean _noUpdate;
     protected long _startup;
-    
     protected Set<Resource> _toInstallResources;
     protected boolean _readyToInstall;
 
     protected boolean _enableTracking = true;
     protected int _reportedProgress = 0;
 
+    protected boolean _shownContainer;
+
     /** Number of minutes to wait after startup before beginning any real heavy lifting. */
     protected int _delay;