From: Jim Procter Date: Wed, 2 Mar 2022 14:49:56 +0000 (+0000) Subject: JAL-3619 fix up warning message and minimal patch to make sure failed-to-launch viewe... X-Git-Tag: Release_2_11_2_1~52 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=57fd11364c284318be3cae3ded0df30a36ee0d98;p=jalview.git JAL-3619 fix up warning message and minimal patch to make sure failed-to-launch viewers tidy up after themselves. --- diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index b448b4c..fec31b8 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -273,7 +273,7 @@ label.viewer_path = Path to {0} program label.viewer_path_tip = Jalview will first try any path entered here, else standard installation locations.
Double-click to browse for file. label.invalid_viewer_path = Path not found or not executable label.viewer_missing = Structure viewer not found.
Please enter the path to the executable (if installed),
or download and install the program. -label.open_viewer_failed = Error opening {0} - is it installed?\nCheck path in Preferences, Structure +label.open_viewer_failed = Error opening {0} - is it installed?\nCheck configured path in the Preferences' Structure tab label.min_colour = Minimum Colour label.max_colour = Maximum Colour label.no_colour = No Colour diff --git a/src/jalview/gui/ChimeraViewFrame.java b/src/jalview/gui/ChimeraViewFrame.java index 9d98585..4f1f26b 100644 --- a/src/jalview/gui/ChimeraViewFrame.java +++ b/src/jalview/gui/ChimeraViewFrame.java @@ -331,6 +331,7 @@ public class ChimeraViewFrame extends StructureViewerBase getViewerName()), MessageManager.getString("label.error_loading_file"), JvOptionPane.ERROR_MESSAGE); + jmb.closeViewer(true); this.dispose(); return; } diff --git a/src/jalview/gui/PymolViewer.java b/src/jalview/gui/PymolViewer.java index d426051..3b6ea99 100644 --- a/src/jalview/gui/PymolViewer.java +++ b/src/jalview/gui/PymolViewer.java @@ -211,6 +211,8 @@ public class PymolViewer extends StructureViewerBase } catch (Exception ex) { Console.error("Couldn't open PyMOL viewer!", ex); + // if we couldn't open Pymol, no point continuing + return; } } int num = -1; @@ -314,6 +316,7 @@ public class PymolViewer extends StructureViewerBase getViewerName()), MessageManager.getString("label.error_loading_file"), JvOptionPane.ERROR_MESSAGE); + binding.closeViewer(true); this.dispose(); return; }