From 4c39f147c73de53370dbc55103cd521625b6aac4 Mon Sep 17 00:00:00 2001 From: lehtonen Date: Mon, 12 Sep 2011 12:53:55 +0000 Subject: [PATCH] Fixed problems after Kalle removed UndoWriteRequest. git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@22193 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../sysdyn/ui/editor/participant/SysdynConnectTool.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/SysdynConnectTool.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/SysdynConnectTool.java index ff80b558..5a9bcc63 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/SysdynConnectTool.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/SysdynConnectTool.java @@ -15,15 +15,13 @@ import java.util.List; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; -import org.simantics.db.UndoContext; import org.simantics.db.WriteGraph; -import org.simantics.db.common.UndoWriteRequest; +import org.simantics.db.common.request.WriteRequest; import org.simantics.db.exception.DatabaseException; import org.simantics.db.request.Read; import org.simantics.diagram.participant.ConnectTool2; import org.simantics.diagram.participant.ConnectionBuilder; import org.simantics.diagram.participant.ControlPoint; -import org.simantics.diagram.ui.DiagramModelHints; import org.simantics.g2d.canvas.impl.SGNodeReflection.SGInit; import org.simantics.g2d.connection.IConnectionAdvisor; import org.simantics.g2d.diagram.DiagramHints; @@ -393,7 +391,6 @@ public class SysdynConnectTool extends ConnectTool2 { if(this.connectionJudgment == null) return; - final UndoContext uctx = diagram.getHint(DiagramModelHints.KEY_UNDO_CONTEXT); final ConnectionJudgement judgment = this.connectionJudgment; // ConnectionBuilder changed to SysdynconnectionBuilder to support overlapping terminals and valve creation final ConnectionBuilder builder = new SysdynConnectionBuilder(this.diagram); @@ -401,7 +398,7 @@ public class SysdynConnectTool extends ConnectTool2 { final TerminalInfo startTerminal = this.startTerminal; final TerminalInfo endTerminal = this.endTerminal; - SimanticsUI.getSession().asyncRequest(new UndoWriteRequest(uctx, true) { + SimanticsUI.getSession().asyncRequest(new WriteRequest() { @Override public void perform(WriteGraph graph) throws DatabaseException { builder.create(graph, judgment, controlPoints, startTerminal, endTerminal); -- 2.47.1