From cf6b9ba427c210e1074d51bbc5712486f80930ec Mon Sep 17 00:00:00 2001 From: Marko Luukkainen Date: Thu, 5 Dec 2019 11:16:58 +0200 Subject: [PATCH] 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 --- .../src/org/simantics/g3d/vtk/common/AbstractVTKNodeMap.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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()) { -- 2.47.1