X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.plant3d%2Fsrc%2Forg%2Fsimantics%2Fplant3d%2Fscenegraph%2FPipeRun.java;h=1d199f53f2ec604737d798a3ec074e7978bda485;hb=ce1395110dd0db27c7c99c426181b49d22211264;hp=2c334c1f2810f085f0deaad34028ea9d2a28994c;hpb=178af981ba4ccabe1aa3d6d3a4f67a1eb30b3cc5;p=simantics%2F3d.git diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipeRun.java b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipeRun.java index 2c334c1f..1d199f53 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipeRun.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipeRun.java @@ -112,8 +112,22 @@ public class PipeRun extends P3DParentNode { } @RelatedElementsRem(Plant3D.URIs.children) + public void _remChild(PipelineComponent node) { + //since we do not now, if DB remove is actually remove or detach, we have to use detach. NodeMap will handle Component removals. + deattachNode(Plant3D.URIs.children, node); + } + public void remChild(PipelineComponent node) { - removeNode(Plant3D.URIs.children, node); + removeNode(Plant3D.URIs.children, node); + } + + @Override + public void remove() { + // since we do not now, if DB remove is actually remove or detach, we have to use detach. NodeMap will handle Component removals. + Collection comps = getChild(); + for (PipelineComponent c : comps) + c.deattach(); + super.remove(); }