mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-18 17:26:22 +02:00
LCL/ShellCtrls: Do not raise a silent exception when the current path in the TreeView does not exist any more.
This commit is contained in:
parent
01d11f00ee
commit
222117e473
@ -652,12 +652,8 @@ begin
|
||||
RootNode := Items.AddChild(nil, FRoot);
|
||||
RootNode.HasChildren := True;
|
||||
RootNode.Expand(False);
|
||||
try
|
||||
SetPath(CurrPath);
|
||||
except
|
||||
// CurrPath may have been removed in the mean time by another process, just ignore
|
||||
on E: EInvalidPath do ;//
|
||||
end;
|
||||
if Exists(CurrPath) then
|
||||
SetPath(CurrPath);
|
||||
end;
|
||||
finally
|
||||
EndUpdate;
|
||||
@ -675,12 +671,8 @@ begin
|
||||
try
|
||||
BeginUpdate;
|
||||
Refresh(nil);
|
||||
try
|
||||
if Exists(CurrPath) then
|
||||
SetPath(CurrPath);
|
||||
except
|
||||
// CurrPath may have been removed in the mean time by another process, just ignore
|
||||
on E: EInvalidPath do ;//
|
||||
end;
|
||||
finally
|
||||
EndUpdate;
|
||||
end;
|
||||
@ -710,12 +702,8 @@ begin
|
||||
RootNode := Items.AddChild(nil, FRoot);
|
||||
RootNode.HasChildren := True;
|
||||
RootNode.Expand(False);
|
||||
try
|
||||
SetPath(CurrPath);
|
||||
except
|
||||
// CurrPath may have been removed in the mean time by another process, just ignore
|
||||
on E: EInvalidPath do ;//
|
||||
end;
|
||||
if Exists(Currpath) then
|
||||
SetPath(CurrPath);
|
||||
end;
|
||||
finally
|
||||
EndUpdate;
|
||||
|
Loading…
Reference in New Issue
Block a user