fixed the dreadful "Undo list index out of range" bug
This commit is contained in:
parent
f95eef2378
commit
bbfdaac633
@ -912,7 +912,7 @@ procedure TMainForm.UpdateUndo;
|
||||
begin
|
||||
SaveFlame(MainCp, Format('%.4d-', [UndoIndex]) + MainCp.name, AppPath + 'apophysis.undo');
|
||||
Inc(UndoIndex);
|
||||
inc(UndoMax);
|
||||
UndoMax := UndoIndex; //Inc(UndoMax);
|
||||
mnuSaveUndo.Enabled := true;
|
||||
mnuUndo.Enabled := True;
|
||||
mnuPopUndo.Enabled := True;
|
||||
@ -1294,8 +1294,8 @@ begin
|
||||
if EntryExists(title, filename) then DeleteEntry(title, fileName);
|
||||
Append(IFile);
|
||||
end
|
||||
else
|
||||
ReWrite(IFile);
|
||||
else ReWrite(IFile);
|
||||
|
||||
sl := TStringList.Create;
|
||||
try
|
||||
cp1.SaveToStringList(sl);
|
||||
@ -3250,7 +3250,7 @@ begin
|
||||
StopThread;
|
||||
Inc(UndoIndex);
|
||||
|
||||
assert(UndoIndex < UndoMax, 'Undo list index out of range!');
|
||||
assert(UndoIndex <= UndoMax, 'Undo list index out of range!');
|
||||
|
||||
LoadUndoFlame(UndoIndex, AppPath + 'apophysis.undo');
|
||||
mnuUndo.Enabled := True;
|
||||
|
Loading…
Reference in New Issue
Block a user