]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Fixed problems after Kalle removed UndoWriteRequest.
authorlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Mon, 12 Sep 2011 12:53:55 +0000 (12:53 +0000)
committerlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Mon, 12 Sep 2011 12:53:55 +0000 (12:53 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@22193 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/SysdynConnectTool.java

index ff80b5589669de5dcc64c8ea44afb59874498005..5a9bcc63bb2aabd701bb47ec04e9a92e37c74940 100644 (file)
@@ -15,15 +15,13 @@ import java.util.List;
 \r
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.Resource;\r
-import org.simantics.db.UndoContext;\r
 import org.simantics.db.WriteGraph;\r
-import org.simantics.db.common.UndoWriteRequest;\r
+import org.simantics.db.common.request.WriteRequest;\r
 import org.simantics.db.exception.DatabaseException;\r
 import org.simantics.db.request.Read;\r
 import org.simantics.diagram.participant.ConnectTool2;\r
 import org.simantics.diagram.participant.ConnectionBuilder;\r
 import org.simantics.diagram.participant.ControlPoint;\r
-import org.simantics.diagram.ui.DiagramModelHints;\r
 import org.simantics.g2d.canvas.impl.SGNodeReflection.SGInit;\r
 import org.simantics.g2d.connection.IConnectionAdvisor;\r
 import org.simantics.g2d.diagram.DiagramHints;\r
@@ -393,7 +391,6 @@ public class SysdynConnectTool extends ConnectTool2 {
        \r
        if(this.connectionJudgment == null) return;\r
        \r
-        final UndoContext uctx = diagram.getHint(DiagramModelHints.KEY_UNDO_CONTEXT);\r
         final ConnectionJudgement judgment = this.connectionJudgment;\r
         // ConnectionBuilder changed to SysdynconnectionBuilder to support overlapping terminals and valve creation\r
         final ConnectionBuilder builder = new SysdynConnectionBuilder(this.diagram);\r
@@ -401,7 +398,7 @@ public class SysdynConnectTool extends ConnectTool2 {
         final TerminalInfo startTerminal = this.startTerminal;\r
         final TerminalInfo endTerminal = this.endTerminal;\r
 \r
-        SimanticsUI.getSession().asyncRequest(new UndoWriteRequest(uctx, true) {\r
+        SimanticsUI.getSession().asyncRequest(new WriteRequest() {\r
             @Override\r
             public void perform(WriteGraph graph) throws DatabaseException {\r
                 builder.create(graph, judgment, controlPoints, startTerminal, endTerminal);\r