mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 03:19:17 +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
|
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user