Author: apico
Date: 2011-06-04 18:00:39 -0700 (Sat, 04 Jun 2011)
New Revision: 25647
Modified:
csplugins/trunk/ucsf/scooter/metaNodePlugin2/src/metaNodePlugin2/model/MetaNodeManager.java
Log:
fixed impl of expandAll/collapseAll per network view. This is critical for
distinguishing operations on nested network views of metanodes. Addresses NPE
at MetaNode.expand.
Modified:
csplugins/trunk/ucsf/scooter/metaNodePlugin2/src/metaNodePlugin2/model/MetaNodeManager.java
===================================================================
---
csplugins/trunk/ucsf/scooter/metaNodePlugin2/src/metaNodePlugin2/model/MetaNodeManager.java
2011-06-05 00:26:31 UTC (rev 25646)
+++
csplugins/trunk/ucsf/scooter/metaNodePlugin2/src/metaNodePlugin2/model/MetaNodeManager.java
2011-06-05 01:00:39 UTC (rev 25647)
@@ -166,8 +166,12 @@
}
static public void expandAll(CyNetworkView view) {
CyNetworkView nView = view;
+ CyNetwork network = view.getNetwork();
Collection<MetaNode> metaNodes = metaMap.values();
for (MetaNode mNode: metaNodes) {
+ CyNetwork groupNetwork =
mNode.getCyGroup().getNetwork();
+ if (!network.equals(groupNetwork))
+ continue;
if (mNode.isHidden())
continue;
if (mNode.isCollapsed())
@@ -192,8 +196,12 @@
}
static public void collapseAll(CyNetworkView view) {
CyNetworkView nView = view;
+ CyNetwork network = view.getNetwork();
Collection<MetaNode> metaNodes = metaMap.values();
for (MetaNode mNode: metaNodes) {
+ CyNetwork groupNetwork =
mNode.getCyGroup().getNetwork();
+ if (!network.equals(groupNetwork))
+ continue;
if (!mNode.isCollapsed())
mNode.getCyGroup().setState(MetaNodePlugin2.COLLAPSED);
}
--
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.