Author: rozagh
Date: 2012-07-25 17:47:02 -0700 (Wed, 25 Jul 2012)
New Revision: 29995

Modified:
   
core3/impl/trunk/model-impl/impl/src/main/java/org/cytoscape/model/internal/CySubNetworkImpl.java
Log:
Unset selected flag for removed (orphaned) Nodes and Edges

Modified: 
core3/impl/trunk/model-impl/impl/src/main/java/org/cytoscape/model/internal/CySubNetworkImpl.java
===================================================================
--- 
core3/impl/trunk/model-impl/impl/src/main/java/org/cytoscape/model/internal/CySubNetworkImpl.java
   2012-07-26 00:45:18 UTC (rev 29994)
+++ 
core3/impl/trunk/model-impl/impl/src/main/java/org/cytoscape/model/internal/CySubNetworkImpl.java
   2012-07-26 00:47:02 UTC (rev 29995)
@@ -225,13 +225,17 @@
        public boolean removeNodes(final Collection<CyNode> nodes) {
                if ( nodes == null || nodes.isEmpty() )
                        return false;
-
                eventHelper.fireEvent(new AboutToRemoveNodesEvent(this, nodes));
 
                boolean ret = removeNodesInternal(nodes);
 
-               if ( ret )
+               if ( ret ){
+                       for(CyNode node: nodes)
+                               if (this.containsNode(node))
+                                       getRow(node).set(CyNetwork.SELECTED, 
false);
+
                        eventHelper.fireEvent(new RemovedNodesEvent(this));
+               }
 
                return ret;
        }
@@ -247,8 +251,13 @@
 
                boolean ret = removeEdgesInternal(edges);
 
-               if ( ret )
+               if ( ret ){
+                       for(CyEdge edge: edges)
+                               if (this.containsEdge(edge))
+                                       getRow(edge).set(CyNetwork.SELECTED, 
false);
+                       
                        eventHelper.fireEvent(new RemovedEdgesEvent(this));
+               }
 
                return ret;
        }

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