diff --git a/source/helpers.pas b/source/helpers.pas index 7ae61f03..3987b7df 100644 --- a/source/helpers.pas +++ b/source/helpers.pas @@ -2695,10 +2695,9 @@ begin Node := VT.GetFirst; while Assigned(Node) do begin if Node.Index = idx then begin - VT.FocusedNode := Node; - VT.Selected[Node] := True; - end else - VT.Selected[Node] := False; + SelectNode(VT, Node); + break; + end; Node := VT.GetNextSibling(Node); end; end;