瀏覽代碼

fixed bugs

jascha Bohne 8 年之前
父節點
當前提交
a2c2fa7e8c

+ 9 - 0
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/graphs/GraphManager.java

@@ -620,11 +620,20 @@ public class GraphManager {
 	protected void deselectNodesAfterEdgeCreation(String nodeID) {
 		Node n = getGraph().getNode(nodeID);
 		if (!hasClass(n, UI_CLASS_PROCESSING_ENABLED) || !GraphDisplayManager.getCurrentLayer().equals(Layer.MAPPING)) {
+
 			n.removeAttribute("ui.style");
 			n.changeAttribute("ui.style", "fill-color: #000000; size: 15px;");
 		}
 	}
 
+	/**
+	 * Resets the selction of the Node for Edge selection
+	 */
+	public void deselectEdgeCreationNodes() {
+		if (lastClickedID != null)
+			deselectNodesAfterEdgeCreation(lastClickedID);
+	}
+
 	protected boolean addClass(String id, String className) {
 		Element e = getGraph().getEdge(id);
 		if (e == null)

+ 4 - 2
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/io/GraphMLExporter.java

@@ -52,14 +52,16 @@ public class GraphMLExporter {
 	 *            The parent window of the save Window
 	 */
 	public void writeGraph(final Graph g, final Stage stage) {
-		clearAttributes(g);
 		String fileName;
 		FileChooser fileChooser = new FileChooser();
 		fileChooser.setTitle("Saving graph");
 		try {
 			fileName = fileChooser.showSaveDialog(stage).getPath();
 			Main.getInstance().getGraphManager().setCurrentPath(fileName);
-			writeGraph(g, fileName);
+			if (fileName != null){
+				clearAttributes(g);
+				writeGraph(g, fileName);
+			}
 		} catch (NullPointerException e) {
 
 		}