mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 16:38:17 +02:00
* Search element from back to front to respect Z-order (bug id #33291)
git-svn-id: trunk@57683 -
This commit is contained in:
parent
445127a35d
commit
b31e9e78e1
@ -913,8 +913,9 @@ begin
|
||||
Result:=B;
|
||||
RB:=B.AsBand;
|
||||
O:=Nil;
|
||||
I:=0;
|
||||
While (O=Nil) and (I<COunt) do
|
||||
// We must search backwards
|
||||
I:=Count-1;
|
||||
While (O=Nil) and (I>=0) do
|
||||
begin
|
||||
O:=Objects[i];
|
||||
{$IFDEF DEBUGROL}
|
||||
@ -930,7 +931,7 @@ begin
|
||||
if not PtInRect(R,P) then
|
||||
O:=Nil;
|
||||
end;
|
||||
Inc(I);
|
||||
Dec(I);
|
||||
end;
|
||||
if O<>Nil then
|
||||
Result:=O;
|
||||
|
Loading…
Reference in New Issue
Block a user