JAL-3619 fix up warning message and minimal patch to make sure failed-to-launch viewe...
authorJim Procter <j.procter@dundee.ac.uk>
Wed, 2 Mar 2022 14:49:56 +0000 (14:49 +0000)
committerJim Procter <j.procter@dundee.ac.uk>
Wed, 2 Mar 2022 14:49:56 +0000 (14:49 +0000)
resources/lang/Messages.properties
src/jalview/gui/ChimeraViewFrame.java
src/jalview/gui/PymolViewer.java

index b448b4c..fec31b8 100644 (file)
@@ -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.<br>Double-click to browse for file.
 label.invalid_viewer_path = Path not found or not executable
 label.viewer_missing = Structure viewer not found.<br/>Please enter the path to the executable (if installed),<br/>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
index 9d98585..4f1f26b 100644 (file)
@@ -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;
     }
index d426051..3b6ea99 100644 (file)
@@ -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;
     }