* Properly nest beginupdate/endupdate in doaddobject

This commit is contained in:
Michaël Van Canneyt 2024-08-27 09:52:24 +02:00
parent dd26c1502c
commit 8139c0a8bd

View File

@ -1946,16 +1946,14 @@ begin
DupIgnore : Exit;
DupError : Error(SDuplicateString,0)
end;
InsertItem (Result,S);
if (aObject<>Nil) then
begin
BeginUpdate;
try
BeginUpdate;
try
InsertItem (Result,S);
if (aObject<>Nil) then
Objects[Result]:=AObject;
finally
EndUpdate;
end;
end;
finally
EndUpdate;
end;
end;
function TStringList.Add(const S: string): Integer;