From: Marko Luukkainen Date: Thu, 5 Dec 2019 09:16:58 +0000 (+0200) Subject: Fix removed nodes leaving visible graphical elements. X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F73%2F3673%2F1;p=simantics%2F3d.git Fix removed nodes leaving visible graphical elements. When a node was removed and updated at the same cycle, it: 1. Was removed 2. Graphics were updated, which added graphics back to the visualization gitlab #35 Change-Id: Ic512d450ea015f6969dd901558b36caaa88754bd --- diff --git a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/AbstractVTKNodeMap.java b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/AbstractVTKNodeMap.java index f4458fc3..4bcb5df2 100644 --- a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/AbstractVTKNodeMap.java +++ b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/common/AbstractVTKNodeMap.java @@ -497,7 +497,10 @@ public abstract class AbstractVTKNodeMap implements VT } } } - + // Do not process updates for removed nodes. + for (Pair r : removed) { + updated.removeValues(r.first); + } rem.addAll(removed); add.addAll(added); for (E e : updated.getKeys()) {