# HG changeset patch # User Benjamin Golinvaux # Date 1586155450 -7200 # Node ID 00c8322bbe69d1e3df1814c81e76df0703b66e22 # Parent e92c516adcbda46808fa536ccd8a533ce5a0e8eb Ability to force a re-slice of the structure set volume. This is a fix for the fact that the structure set does not increase the slice revision when new polygons are added. This should be fixed in the slicer but this is a temporary fix until this is done properly. diff -r e92c516adcbd -r 00c8322bbe69 Framework/Volumes/VolumeSceneLayerSource.cpp --- a/Framework/Volumes/VolumeSceneLayerSource.cpp Mon Apr 06 08:43:03 2020 +0200 +++ b/Framework/Volumes/VolumeSceneLayerSource.cpp Mon Apr 06 08:44:10 2020 +0200 @@ -102,7 +102,7 @@ } - void VolumeSceneLayerSource::Update(const CoordinateSystem3D& plane) + void VolumeSceneLayerSource::Update(const CoordinateSystem3D& plane, bool forceLayerRecreation) { assert(slicer_.get() != NULL); std::unique_ptr slice(slicer_->ExtractSlice(plane)); @@ -117,7 +117,8 @@ // The slicer cannot handle this cutting plane: Clear the layer ClearLayer(); } - else if (lastPlane_.get() != NULL && + else if (!forceLayerRecreation && + lastPlane_.get() != NULL && IsSameCuttingPlane(*lastPlane_, plane) && lastRevision_ == slice->GetRevision()) { diff -r e92c516adcbd -r 00c8322bbe69 Framework/Volumes/VolumeSceneLayerSource.h --- a/Framework/Volumes/VolumeSceneLayerSource.h Mon Apr 06 08:43:03 2020 +0200 +++ b/Framework/Volumes/VolumeSceneLayerSource.h Mon Apr 06 08:44:10 2020 +0200 @@ -80,6 +80,6 @@ you can lock the whole viewport data (including scene) by means of the IViewport::Lock method. */ - void Update(const CoordinateSystem3D& plane); + void Update(const CoordinateSystem3D& plane, bool forceLayerRecreation = false); }; }