]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
Synchronizing connected objects did not send events. 69/3369/1
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Fri, 18 Oct 2019 12:22:20 +0000 (15:22 +0300)
committerMarko Luukkainen <marko.luukkainen@semantum.fi>
Fri, 18 Oct 2019 12:22:20 +0000 (15:22 +0300)
Without events, removing a component left connection relations to the
DB, which then caused problems with undo handling, and corruption of
component structure.

gitlab #35

Change-Id: I1e67df0db3fcdc71c5191411e2e93d9df18791cf

org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipelineComponent.java

index 28e4ad71f12951eb9237ef2b2514ae3c12047413..90dba91d0282b748ec0c0c8be196a6651af102ea 100644 (file)
@@ -265,14 +265,17 @@ public abstract class PipelineComponent extends GeometryNode {
                if (next == comp) {
                        next = null;
                        syncnext = false;
+                       firePropertyChanged(Plant3D.URIs.HasNext);
                        syncNext();
                } else if (previous == comp) {
                        previous = null;
                        syncprev = false;
+                       firePropertyChanged(Plant3D.URIs.HasPrevious);
                        syncPrevious();
                } else if (branch0 == comp) {
                        branch0 = null;
                        syncbr0 = false;
+                       firePropertyChanged(Plant3D.URIs.HasBranch0);
                        syncBranch0();
                }
        }