diff options
Diffstat (limited to 'UVtools.Core/Operations/OperationCalibrateStressTower.cs')
-rw-r--r-- | UVtools.Core/Operations/OperationCalibrateStressTower.cs | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/UVtools.Core/Operations/OperationCalibrateStressTower.cs b/UVtools.Core/Operations/OperationCalibrateStressTower.cs index 231ba70..e588b19 100644 --- a/UVtools.Core/Operations/OperationCalibrateStressTower.cs +++ b/UVtools.Core/Operations/OperationCalibrateStressTower.cs @@ -418,7 +418,7 @@ namespace UVtools.Core.Operations Parallel.For(0, LayerCount, layerIndex => { - newLayers[layerIndex] = new Layer((uint)layerIndex, layers[layerIndex], SlicerFile.LayerManager); + newLayers[layerIndex] = new Layer((uint)layerIndex, layers[layerIndex], SlicerFile.LayerManager) {IsModified = true}; layers[layerIndex].Dispose(); lock (progress) { @@ -430,16 +430,15 @@ namespace UVtools.Core.Operations if (SlicerFile.ThumbnailsCount > 0) SlicerFile.SetThumbnails(GetThumbnail()); - SlicerFile.SuppressRebuildProperties = true; - SlicerFile.LayerHeight = (float)LayerHeight; - SlicerFile.BottomExposureTime = (float)BottomExposure; - SlicerFile.ExposureTime = (float)NormalExposure; - SlicerFile.BottomLayerCount = BottomLayers; - SlicerFile.LayerManager.Layers = newLayers; - SlicerFile.LayerManager.RebuildLayersProperties(); - SlicerFile.SuppressRebuildProperties = false; - - + SlicerFile.SuppressRebuildPropertiesWork(() => + { + SlicerFile.LayerHeight = (float)LayerHeight; + SlicerFile.BottomExposureTime = (float)BottomExposure; + SlicerFile.ExposureTime = (float)NormalExposure; + SlicerFile.BottomLayerCount = BottomLayers; + SlicerFile.LayerManager.Layers = newLayers; + }, true); + return !progress.Token.IsCancellationRequested; } |