From: Dmitry D. Chernov Date: Mon, 4 Sep 2023 09:38:47 +0000 (+1000) Subject: Fix position inaccuracy in some cases when pasting objects X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=d1d8c51b133bc9571156ea9aef7eef3b979c0025;p=d2df-editor.git 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. --- 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