🐛 Fix Undo handling

This commit is contained in:
Andreas Schneider 2022-05-22 11:27:27 +02:00
parent dfef4d3556
commit 97c8270b38
1 changed files with 3 additions and 1 deletions

View File

@ -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;