瀏覽代碼

Fixed Bug when adding Nodes to empty underlay graph

Jan Enders 7 年之前
父節點
當前提交
81df30e5bd
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/graphs/GraphManager.java

+ 4 - 1
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/graphs/GraphManager.java

@@ -384,7 +384,10 @@ public class GraphManager {
 		for (String s : n.getAttributeKeySet()) {
 			attributes.put(s, n.getAttribute(s));
 		}
-		String nodeId = activeSubGraph.getId() + n.getId();
+		String nodeId = n.getId();
+		if (activeSubGraph != null){
+			nodeId = activeSubGraph.getId() + nodeId;
+		}
 		g.addNode(nodeId);
 		g.getNode(nodeId).addAttributes(attributes);
 		if (activeSubGraph != null && !activeSubGraph.equals(g)) {