From d1d8c51b133bc9571156ea9aef7eef3b979c0025 Mon Sep 17 00:00:00 2001 From: "Dmitry D. Chernov" Date: Mon, 4 Sep 2023 19:38:47 +1000 Subject: [PATCH] Fix position inaccuracy in some cases when pasting objects The minimum X and Y coordinates may belong to different objects, which I didn't take into account. --- src/editor/f_main.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas index 2df86ca..aaa201e 100644 --- a/src/editor/f_main.pas +++ b/src/editor/f_main.pas @@ -5836,8 +5836,8 @@ begin if h > 0 then begin - xadj := -pmin.X - Floor((MapOffset.X - 32) / DotStep) * DotStep; - yadj := -pmin.Y - Floor((MapOffset.Y - 32) / DotStep) * DotStep; + xadj := Floor((-pmin.X - MapOffset.X + 32) / DotStep) * DotStep; + yadj := Floor((-pmin.Y - MapOffset.Y + 32) / DotStep) * DotStep; end else begin -- 2.29.2