Author: jm
Date: 2012-05-03 12:17:22 -0700 (Thu, 03 May 2012)
New Revision: 29093
Modified:
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/layout/ui/LayoutMenu.java
Log:
Reduced number of heap allocations when populating the Layouts menu
Modified:
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/layout/ui/LayoutMenu.java
===================================================================
---
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/layout/ui/LayoutMenu.java
2012-05-03 19:15:07 UTC (rev 29092)
+++
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/layout/ui/LayoutMenu.java
2012-05-03 19:17:22 UTC (rev 29093)
@@ -138,8 +138,7 @@
CyNetworkView view = appMgr.getCurrentNetworkView();
CyNetwork network = view.getModel();
- List<CyNode> selectedNodes =
CyTableUtil.getNodesInState(network,CyNetwork.SELECTED,true);
- boolean someSelected = selectedNodes.size() > 0;
+ boolean someSelected =
network.getDefaultNodeTable().countMatchingRows(CyNetwork.SELECTED, true) > 0;
boolean enableMenuItem = checkEnabled();
--
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.