Skip to content

Commit

Permalink
Fix cell cursor offset bug in height tools
Browse files Browse the repository at this point in the history
  • Loading branch information
Rampastring committed Jun 16, 2023
1 parent eb0fe1c commit 9918224
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/TSMapEditor/UI/CursorActions/LowerGroundCursorAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ public override void LeftClick(Point2D cellCoords)
{
base.LeftClick(cellCoords);

Point2D targetCellCoords = cellCoords - new Point2D(CursorActionTarget.BrushSize.Width / 2, CursorActionTarget.BrushSize.Height / 2);

var mutation = new LowerGroundMutation(CursorActionTarget.MutationTarget, targetCellCoords, CursorActionTarget.BrushSize);
var mutation = new LowerGroundMutation(CursorActionTarget.MutationTarget, cellCoords, CursorActionTarget.BrushSize);
CursorActionTarget.MutationManager.PerformMutation(mutation);
}
}
Expand Down
4 changes: 1 addition & 3 deletions src/TSMapEditor/UI/CursorActions/RaiseGroundCursorAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ public override void LeftClick(Point2D cellCoords)
{
base.LeftClick(cellCoords);

Point2D targetCellCoords = cellCoords - new Point2D(CursorActionTarget.BrushSize.Width / 2, CursorActionTarget.BrushSize.Height / 2);

var mutation = new RaiseGroundMutation(CursorActionTarget.MutationTarget, targetCellCoords, CursorActionTarget.BrushSize);
var mutation = new RaiseGroundMutation(CursorActionTarget.MutationTarget, cellCoords, CursorActionTarget.BrushSize);
CursorActionTarget.MutationManager.PerformMutation(mutation);
}
}
Expand Down

0 comments on commit 9918224

Please sign in to comment.