LCL, TreeView: fix GetNextVisible, GetPrevVisible. Issue #21264

- Visible means "property Visible" (and all parents Visible and Expanded)
- It does not mean: within the scrolled-in area

git-svn-id: trunk@36577 -
This commit is contained in:
martin 2012-04-05 12:47:07 +00:00
parent 51262ce4b0
commit 01f0b60bfc

View File

@ -889,7 +889,7 @@ begin
if Result<>nil then
Result:=Result.GetNextVisibleSibling;
end;
if (Result<>nil) and ((not Result.IsVisible) or (not Result.FVisible)) then
if (Result<>nil) and ( (not Result.FVisible) or (not AreParentsExpandedAndVisible) ) then
Result:=nil;
end;
@ -917,7 +917,7 @@ begin
end
else
Result := Parent;
if (Result<>nil) and (TreeView<>nil) and (not TreeView.IsNodeVisible(Result)) then
if (Result<>nil) and ( (not Result.FVisible) or (not AreParentsExpandedAndVisible) ) then
Result:=nil;
end;