mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 03:35:58 +02:00
cody: lvlgraph: fixed GetNodeAt with scrolling
git-svn-id: trunk@40381 -
This commit is contained in:
parent
fd01c56742
commit
f20e7dc4f9
@ -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) or (x>=Level.DrawPosition+NodeStyle.Width) then continue;
|
||||
if (X<Level.DrawPosition) or (X>=Level.DrawPosition+NodeStyle.Width) then continue;
|
||||
for n:=Level.Count-1 downto 0 do begin
|
||||
Node:=Level.Nodes[n];
|
||||
if (y<Node.DrawPosition) or (y>=Node.DrawPositionEnd) then continue;
|
||||
if (Y<Node.DrawPosition) or (Y>=Node.DrawPositionEnd) then continue;
|
||||
exit(Node);
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user