From 97c8270b3862f753a69081118131f7c97c2eb65c Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sun, 22 May 2022 11:27:27 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Undo=20handling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Client/UfrmMain.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Client/UfrmMain.pas b/Client/UfrmMain.pas index 9748dbd..b1f6c2d 100644 --- a/Client/UfrmMain.pas +++ b/Client/UfrmMain.pas @@ -746,10 +746,10 @@ begin if (not acSelect.Checked) and (targetTile <> nil) and (SelectedTile <> nil) then begin targetRect := GetSelectedRect; - FUndoList.Clear; if (SelectedTile = targetTile) or ConfirmAction then begin + FUndoList.Clear; if acDraw.Checked then //***** Drawing Mode *****// begin for tileX := FSelection.Left to FSelection.Right do @@ -1217,7 +1217,9 @@ begin dmNetwork.Send(FUndoList[i]); //Cleanup without freeing the objects (this was already done by dmNetwork.Send) + FUndoList.FreeObjects := False; FUndoList.Clear; + FUndoList.FreeObjects := True; //No Undo packets, nothing to undo. acUndo.Enabled := False;