From: Dmitry D. Chernov Date: Sun, 3 Sep 2023 00:40:09 +0000 (+1000) Subject: Place single object near the source one when pasting X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=1ce8d00ce0f8da0afff7b341a361f0993f33e810;p=d2df-editor.git Place single object near the source one when pasting --- diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas index eb7dfdd..d869c78 100644 --- a/src/editor/f_main.pas +++ b/src/editor/f_main.pas @@ -5836,8 +5836,16 @@ begin h := High(CopyBuffer); RemoveSelectFromObjects(); - xadj := -pmin.X - Floor((MapOffset.X - 32) / DotStep) * DotStep; - yadj := -pmin.Y - Floor((MapOffset.Y - 32) / DotStep) * DotStep; + if h > 0 then + begin + xadj := -pmin.X - Floor((MapOffset.X - 32) / DotStep) * DotStep; + yadj := -pmin.Y - Floor((MapOffset.Y - 32) / DotStep) * DotStep; + end + else + begin + xadj := DotStep; + yadj := DotStep; + end; for a := 0 to h do with CopyBuffer[a] do