diff --git a/components/codetools/ide/codyctrls.pas b/components/codetools/ide/codyctrls.pas index 195fbdfbee..576d1796a0 100644 --- a/components/codetools/ide/codyctrls.pas +++ b/components/codetools/ide/codyctrls.pas @@ -1484,13 +1484,15 @@ var Node: TLvlGraphNode; begin Result:=nil; + X+=ScrollLeft; + Y+=ScrollTop; // check in reverse painting order for l:=Graph.LevelCount-1 downto 0 do begin Level:=Graph.Levels[l]; - if (x=Level.DrawPosition+NodeStyle.Width) then continue; + if (X=Level.DrawPosition+NodeStyle.Width) then continue; for n:=Level.Count-1 downto 0 do begin Node:=Level.Nodes[n]; - if (y=Node.DrawPositionEnd) then continue; + if (Y=Node.DrawPositionEnd) then continue; exit(Node); end; end;