mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-10 03:48:27 +02:00
LCL: Trim spaces in TImageListEditorDlg.BtnAddClick. Reduce try...finally blocks. issue #23224
git-svn-id: trunk@39176 -
This commit is contained in:
parent
a1892d81c9
commit
b464e5d458
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user