From f20e7dc4f9f86b2c132523131e410a8b441b81b3 Mon Sep 17 00:00:00 2001 From: mattias Date: Sun, 24 Feb 2013 09:04:02 +0000 Subject: [PATCH] cody: lvlgraph: fixed GetNodeAt with scrolling git-svn-id: trunk@40381 - --- components/codetools/ide/codyctrls.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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;