🐛 Fix Undo handling
This commit is contained in:
parent
dfef4d3556
commit
97c8270b38
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue