X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FDesktop.java;h=bbd4daeb91fd5c280bb69dd5a7a6d0542c2bfcd4;hb=HEAD;hp=a2a344cbf84f066bd47b350402bcb47d854d4ecb;hpb=7553b1d4e5aeb837c94d1281ed91e6635edc37b3;p=jalview.git diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index a2a344c..bbd4dae 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -680,22 +680,7 @@ public class Desktop extends jalview.jbgui.GDesktop // configure services StructureSelectionManager ssm = StructureSelectionManager .getStructureSelectionManager(this); - if (Cache.getDefault(Preferences.ADD_SS_ANN, true)) - { - ssm.setAddTempFacAnnot( - Cache.getDefault(Preferences.ADD_TEMPFACT_ANN, true)); - ssm.setProcessSecondaryStructure( - Cache.getDefault(Preferences.STRUCT_FROM_PDB, true)); - // JAL-3915 - RNAView is no longer an option so this has no effect - ssm.setSecStructServices( - Cache.getDefault(Preferences.USE_RNAVIEW, false)); - } - else - { - ssm.setAddTempFacAnnot(false); - ssm.setProcessSecondaryStructure(false); - ssm.setSecStructServices(false); - } + StructureSelectionManager.doConfigureStructurePrefs(ssm); } public void checkForNews() @@ -1518,7 +1503,21 @@ public class Desktop extends jalview.jbgui.GDesktop { // suppress a possible repeat prompt to save script groovyConsole.setDirty(false); - groovyConsole.exit(); + + // and tidy up + if (((Window) groovyConsole.getFrame()) != null + && ((Window) groovyConsole.getFrame()).isVisible()) + { + // console is visible -- FIXME JAL-4327 + groovyConsole.exit(); + } + else + { + // console is not, so just let it dispose itself when we shutdown + // we don't call groovyConsole.exit() because it calls the shutdown + // handler with invokeAndWait() causing deadlock + groovyConsole = null; + } } if (terminateJvm)