LCL: Trim spaces in TImageListEditorDlg.BtnAddClick. Reduce try...finally blocks. issue #23224

git-svn-id: trunk@39176 -
This commit is contained in:
juha 2012-10-28 15:32:12 +00:00
parent a1892d81c9
commit b464e5d458

View File

@ -237,16 +237,14 @@ var
begin
if OpenDialog.Execute then
begin
ImageList.BeginUpdate;
TreeView.BeginUpdate;
try
ImageList.BeginUpdate;
try
for I := 0 to OpenDialog.Files.Count - 1 do AddImageToList(OpenDialog.Files[I]);
finally
ImageList.EndUpdate;
end;
for I := 0 to OpenDialog.Files.Count - 1 do
AddImageToList(TrimRight(OpenDialog.Files[I]));
finally
TreeView.EndUpdate;
ImageList.EndUpdate;
end;
TreeView.SetFocus;
end;