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 begin
if OpenDialog.Execute then if OpenDialog.Execute then
begin begin
ImageList.BeginUpdate;
TreeView.BeginUpdate; TreeView.BeginUpdate;
try try
ImageList.BeginUpdate; for I := 0 to OpenDialog.Files.Count - 1 do
try AddImageToList(TrimRight(OpenDialog.Files[I]));
for I := 0 to OpenDialog.Files.Count - 1 do AddImageToList(OpenDialog.Files[I]);
finally
ImageList.EndUpdate;
end;
finally finally
TreeView.EndUpdate; TreeView.EndUpdate;
ImageList.EndUpdate;
end; end;
TreeView.SetFocus; TreeView.SetFocus;
end; end;