LCL: Fix TTreeNode.GetTextPath. Issue #41356, patch by Don Siders.

This commit is contained in:
Juha 2025-01-31 15:39:25 +02:00
parent fddb4de9bc
commit 5bcc39179c

View File

@ -1361,13 +1361,15 @@ end;
function TTreeNode.GetTextPath: string;
var
Node: TTreeNode;
PDelim: String;
begin
PDelim := FOwner.FOwner.FPathDelimiter;
Result := '';
Node := Self;
while Assigned(Node) do
begin
if Result <> '' then
Result := FOwner.FOwner.FPathDelimiter + Result;
if (Result <> '') and (Node.Text <> PDelim) then
Result := PDelim + Result;
Result := Node.Text + Result;
Node := Node.Parent;
end;