diff options
Diffstat (limited to 'UVtools.Core/Operations/OperationCalibrateGrayscale.cs')
-rw-r--r-- | UVtools.Core/Operations/OperationCalibrateGrayscale.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/UVtools.Core/Operations/OperationCalibrateGrayscale.cs b/UVtools.Core/Operations/OperationCalibrateGrayscale.cs index 68075b8..215bccd 100644 --- a/UVtools.Core/Operations/OperationCalibrateGrayscale.cs +++ b/UVtools.Core/Operations/OperationCalibrateGrayscale.cs @@ -521,16 +521,16 @@ 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; } |