diff options
author | Brett Gyarfas <bgyarfas@gmail.com> | 2022-03-14 21:52:56 +0300 |
---|---|---|
committer | Brett Gyarfas <bgyarfas@gmail.com> | 2022-03-14 21:52:56 +0300 |
commit | 67c8bbe4ad30d56ebb86c47c7accfff1d1c9a46e (patch) | |
tree | f4320aad68a4125ed1d46a8d94bf8579ed32c6b1 /UVtools.Core | |
parent | b0d3c56e53d332bbcb86934d141fe9963519a96e (diff) |
Fix indexing when using Tools->Adjust layer height->Offset. Previously it left the last layer un-changed
Diffstat (limited to 'UVtools.Core')
-rw-r--r-- | UVtools.Core/Operations/OperationLayerReHeight.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/UVtools.Core/Operations/OperationLayerReHeight.cs b/UVtools.Core/Operations/OperationLayerReHeight.cs index f53f5e4..cec479f 100644 --- a/UVtools.Core/Operations/OperationLayerReHeight.cs +++ b/UVtools.Core/Operations/OperationLayerReHeight.cs @@ -122,7 +122,7 @@ public sealed class OperationLayerReHeight : Operation break; } - for (var layerIndex = LayerIndexStart; layerIndex < LayerIndexEnd; layerIndex++) + for (var layerIndex = LayerIndexStart; layerIndex <= LayerIndexEnd; layerIndex++) { if ((decimal) SlicerFile[layerIndex].PositionZ + _positionZOffset < 0) { @@ -407,7 +407,7 @@ public sealed class OperationLayerReHeight : Operation } else if (_method == OperationLayerReHeightMethod.OffsetPositionZ) { - for (var layerIndex = LayerIndexStart; layerIndex < LayerIndexEnd; layerIndex++) + for (var layerIndex = LayerIndexStart; layerIndex <= LayerIndexEnd; layerIndex++) { SlicerFile[layerIndex].PositionZ += (float)_positionZOffset; progress++; |