Author: oriol
Date: 2012-10-24 05:07:24 -0700 (Wed, 24 Oct 2012)
New Revision: 30702

Modified:
   
core3/impl/trunk/model-impl/impl/src/main/java/org/cytoscape/model/internal/CyRootNetworkImpl.java
Log:
Fix bug #1527. The fix remove the tables from the table manager before removing 
them from the networkTableManager.

Modified: 
core3/impl/trunk/model-impl/impl/src/main/java/org/cytoscape/model/internal/CyRootNetworkImpl.java
===================================================================
--- 
core3/impl/trunk/model-impl/impl/src/main/java/org/cytoscape/model/internal/CyRootNetworkImpl.java
  2012-10-24 00:32:48 UTC (rev 30701)
+++ 
core3/impl/trunk/model-impl/impl/src/main/java/org/cytoscape/model/internal/CyRootNetworkImpl.java
  2012-10-24 12:07:24 UTC (rev 30702)
@@ -34,6 +34,7 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
+import java.util.Map;
 import java.util.Properties;
 
 import org.cytoscape.event.CyEventHelper;
@@ -146,6 +147,21 @@
                for (CySubNetwork network : subNetworks) {
                        network.dispose();
                }
+               Map<String, CyTable> tableMap = networkTableMgr.getTables(this, 
CyNetwork.class);
+               for(CyTable table : tableMap.values() )
+               {
+                       tableMgr.deleteTableInternal(table.getSUID(),true);
+               }
+               tableMap = networkTableMgr.getTables(this, CyNode.class);
+               for(CyTable table : tableMap.values() )
+               {
+                       tableMgr.deleteTableInternal(table.getSUID(),true);
+               }
+           tableMap = networkTableMgr.getTables(this, CyEdge.class);
+               for(CyTable table : tableMap.values() )
+               {
+                       tableMgr.deleteTableInternal(table.getSUID(),true);
+               }
                networkTableMgr.removeAllTables(this);
        }
        

-- 
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