Author: scooter
Date: 2011-05-25 13:04:08 -0700 (Wed, 25 May 2011)
New Revision: 25535

Modified:
   
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/actions/Chimera.java
   
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/ui/ModelNavigatorDialog.java
Log:
Handle case where we're not displaying the model navigator dialog (e.g. from a 
CyCommand) better


Modified: 
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/actions/Chimera.java
===================================================================
--- 
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/actions/Chimera.java 
    2011-05-25 19:57:53 UTC (rev 25534)
+++ 
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/actions/Chimera.java 
    2011-05-25 20:04:08 UTC (rev 25535)
@@ -490,14 +490,19 @@
    * 
    */
   public void exit() {
-       if (chimera == null)
-               return;
-       chimeraSend("stop really");
-       chimera.destroy();
-       chimera = null;
-               models = null;
-               modelHash = null;
-               staticPointer = null;
+       if (chimera != null) {
+               chimeraSend("stop really");
+               chimera.destroy();
+               chimera = null;
+                       models = null;
+                       modelHash = null;
+                       staticPointer = null;
+               }
+               if (alDialog != null)
+                       alDialog.setVisible(false);
+
+               if (mnDialog != null)
+                       mnDialog.setVisible(false);
   }
 
        /**

Modified: 
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/ui/ModelNavigatorDialog.java
===================================================================
--- 
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/ui/ModelNavigatorDialog.java
     2011-05-25 19:57:53 UTC (rev 25534)
+++ 
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/ui/ModelNavigatorDialog.java
     2011-05-25 20:04:08 UTC (rev 25535)
@@ -615,9 +615,9 @@
                                
navigationTree.removeSelectionPaths(navigationTree.getSelectionPaths());
                        } else if (type == EXIT) {
                                chimeraObject.exit();
-                               setVisible(false);
-                               if (chimeraObject.getAlignDialog() != null)
-                                       
chimeraObject.getAlignDialog().setVisible(false);
+                               // setVisible(false);
+                               // if (chimeraObject.getAlignDialog() != null)
+                               //      
chimeraObject.getAlignDialog().setVisible(false);
                        } else if (type == FUNCTIONALRESIDUES) {
                                String command = null;
                                // For all open structures, select the 
functional residues

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to