diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas
index eb7dfdd4fe2877a77d8e5fab92beb419ccbd5349..2df86ca6f40543ca72fe14c0d0ce5e2d911f3ad1 100644 (file)
--- a/src/editor/f_main.pas
+++ b/src/editor/f_main.pas
type
TUndoRec = record
- UndoType: Byte;
- case Byte of
+ case UndoType: Byte of
UNDO_DELETE_PANEL: (Panel: ^TPanel);
UNDO_DELETE_ITEM: (Item: TItem);
UNDO_DELETE_AREA: (Area: TArea);
end;
TCopyRec = record
- ObjectType: Byte;
ID: Cardinal;
- case Byte of
+ case ObjectType: Byte of
OBJECT_PANEL: (Panel: ^TPanel);
OBJECT_ITEM: (Item: TItem);
OBJECT_AREA: (Area: TArea);
QuickSortCopyBuffer(0, b);
end;
-// Ð\9fестановка ссылок триггеров:
+// Ð\9fостановка ссылок триггеров:
for a := 0 to Length(CopyBuffer)-1 do
if CopyBuffer[a].ObjectType = OBJECT_TRIGGER then
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