From 2eaa1f6b6ebcee17755bbd4ff572029bab5cd6ae Mon Sep 17 00:00:00 2001 From: haven1433 Date: Thu, 22 Sep 2022 21:05:20 -0500 Subject: [PATCH] improve editing --- src/HexManiac.Core/ViewModels/Map/MapEditorViewModel.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/HexManiac.Core/ViewModels/Map/MapEditorViewModel.cs b/src/HexManiac.Core/ViewModels/Map/MapEditorViewModel.cs index fa446ac7..a6bf72fd 100644 --- a/src/HexManiac.Core/ViewModels/Map/MapEditorViewModel.cs +++ b/src/HexManiac.Core/ViewModels/Map/MapEditorViewModel.cs @@ -382,11 +382,12 @@ namespace HavenSoft.HexManiac.Core.ViewModels.Map { Point drawSource; private void DrawDown(double x, double y, int clickCount) { interactionType = PrimaryInteractionType.Draw; + var map = MapUnderCursor(x, y); if (clickCount == 2) { - var map = MapUnderCursor(x, y); if (map != null) map.PaintBlock(history.CurrentChange, drawBlockIndex, collisionIndex, x, y); Hover(x, y); } else { + PrimaryMap = map; drawSource = ToTilePosition(x, y); DrawMove(x, y); }