diff options
Diffstat (limited to 'UVtools.Core/FileFormats/PHZFile.cs')
-rw-r--r-- | UVtools.Core/FileFormats/PHZFile.cs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/UVtools.Core/FileFormats/PHZFile.cs b/UVtools.Core/FileFormats/PHZFile.cs index 861d163..2a6491f 100644 --- a/UVtools.Core/FileFormats/PHZFile.cs +++ b/UVtools.Core/FileFormats/PHZFile.cs @@ -1020,10 +1020,7 @@ namespace UVtools.Core.FileFormats LayersDefinitions[layerIndex] = layer; } - lock (progress.Mutex) - { - progress++; - } + progress.LockAndIncrement(); }); progress.Reset(OperationProgress.StatusWritingFile, LayerCount); @@ -1151,7 +1148,7 @@ namespace UVtools.Core.FileFormats progress.Token.ThrowIfCancellationRequested(); } - LayerManager = new LayerManager(HeaderSettings.LayerCount, this); + LayerManager.Init(HeaderSettings.LayerCount); progress.Reset(OperationProgress.StatusDecodeLayers, HeaderSettings.LayerCount); @@ -1172,10 +1169,7 @@ namespace UVtools.Core.FileFormats }; } - lock (progress.Mutex) - { - progress++; - } + progress.LockAndIncrement(); }); } } |