From de5d2c5e8f741c7eb9042d12724c143895cae963 Mon Sep 17 00:00:00 2001 From: lempinen Date: Tue, 14 Sep 2010 10:56:43 +0000 Subject: [PATCH] Prevented the creation of valves when connection is dependency git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@17903 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../org/simantics/sysdyn/ui/editor/participant/ConnectTool.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/ConnectTool.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/ConnectTool.java index 10fc52a3..f61b2f95 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/ConnectTool.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/ConnectTool.java @@ -198,6 +198,8 @@ public class ConnectTool extends AbstractDiagramParticipant { private void createValveIfNecessary(Point2D point) { + if (!isCurrentConnectionFlow()) return; + if(startElement != null && startElement.getElementClass().getId().equals(ValveFactory.class.getSimpleName())) { return; } else if(endElement != null && endElement.getElementClass().getId().equals(ValveFactory.class.getSimpleName())) { -- 2.47.1