Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sn4k3/UVtools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Gyarfas <bgyarfas@gmail.com>2022-03-14 21:52:56 +0300
committerBrett Gyarfas <bgyarfas@gmail.com>2022-03-14 21:52:56 +0300
commit67c8bbe4ad30d56ebb86c47c7accfff1d1c9a46e (patch)
treef4320aad68a4125ed1d46a8d94bf8579ed32c6b1 /UVtools.Core
parentb0d3c56e53d332bbcb86934d141fe9963519a96e (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.cs4
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++;