Author: kono
Date: 2009-12-14 14:57:46 -0800 (Mon, 14 Dec 2009)
New Revision: 18757

Modified:
   cytoscape/trunk/src/cytoscape/Cytoscape.java
Log:
Added handler code for NETWORK_DESTROYED event with nested network.

Modified: cytoscape/trunk/src/cytoscape/Cytoscape.java
===================================================================
--- cytoscape/trunk/src/cytoscape/Cytoscape.java        2009-12-14 22:18:29 UTC 
(rev 18756)
+++ cytoscape/trunk/src/cytoscape/Cytoscape.java        2009-12-14 22:57:46 UTC 
(rev 18757)
@@ -1089,6 +1089,8 @@
                        }
                }
 
+               updateNestedNetworkNodes(network);
+               
                // theoretically this should not be set to null till after the 
events
                // firing is done
                network = null;
@@ -1099,6 +1101,15 @@
                if ((currentNetworkID != null) && (currentNetworkViewID == 
null))
                        getDesktop().setFocus(currentNetworkID);
        }
+       
+       
+       private static void updateNestedNetworkNodes(final GraphPerspective 
destroyedNetwork) {
+               for (final CyNode node: 
(List<CyNode>)Cytoscape.getRootGraph().nodesList()) {
+                       if (node.getNestedNetwork() == destroyedNetwork) {
+                               node.setNestedNetwork(null);
+                       }
+               }
+       }
 
        /**
         * destroys the networkview, including any layout information

--

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