Author: mes
Date: 2010-05-27 13:38:27 -0700 (Thu, 27 May 2010)
New Revision: 20336
Modified:
cytoscape/branches/Cyto-2.7.x_release_branch/src/cytoscape/actions/CloneGraphInNewWindowAction.java
Log:
fixed duplicate name problem for bug 2245
Modified:
cytoscape/branches/Cyto-2.7.x_release_branch/src/cytoscape/actions/CloneGraphInNewWindowAction.java
===================================================================
---
cytoscape/branches/Cyto-2.7.x_release_branch/src/cytoscape/actions/CloneGraphInNewWindowAction.java
2010-05-27 20:36:38 UTC (rev 20335)
+++
cytoscape/branches/Cyto-2.7.x_release_branch/src/cytoscape/actions/CloneGraphInNewWindowAction.java
2010-05-27 20:38:27 UTC (rev 20336)
@@ -48,6 +48,7 @@
import cytoscape.view.CyNetworkView;
import cytoscape.visual.VisualStyle;
import cytoscape.util.CytoscapeAction;
+import cytoscape.util.CyNetworkNaming;
import giny.model.Node;
import giny.view.NodeView;
@@ -87,12 +88,11 @@
CyNetwork origNet = Cytoscape.getCurrentNetwork();
CyNetworkView origView = Cytoscape.getCurrentNetworkView();
VisualStyle vs =
Cytoscape.getVisualMappingManager().getVisualStyle();
+ String newName =
CyNetworkNaming.getSuggestedNetworkTitle(origNet.getTitle() + " copy");
CyNetwork new_network =
Cytoscape.createNetwork(origNet.getNodeIndicesArray(),
origNet.getEdgeIndicesArray(),
-
origNet.getTitle() + " copy",
-
null,
-
true);
+ newName, null,
true);
// only clone the view if one actually exists
if ( origView == null || origView ==
Cytoscape.getNullNetworkView() )
--
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.