BColumnListView: Always update the reference rect in ::FindVisibleRect...
...if the row is present in the list, but continue to return false if the row is not currently visible on the screen. Part of #11675. Cherry-picked from https://review.haiku-os.org/442.
This commit is contained in:
committed by
Augustin Cavalier
parent
74e882b39b
commit
81d0a0e0a7
@@ -4561,13 +4561,11 @@ OutlineView::FindVisibleRect(BRow* row, BRect* _rect)
|
|||||||
float line = 0.0;
|
float line = 0.0;
|
||||||
for (RecursiveOutlineIterator iterator(&fRows); iterator.CurrentRow();
|
for (RecursiveOutlineIterator iterator(&fRows); iterator.CurrentRow();
|
||||||
iterator.GoToNext()) {
|
iterator.GoToNext()) {
|
||||||
if (line > fVisibleRect.bottom)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (iterator.CurrentRow() == row) {
|
if (iterator.CurrentRow() == row) {
|
||||||
_rect->Set(fVisibleRect.left, line, fVisibleRect.right,
|
_rect->Set(fVisibleRect.left, line, fVisibleRect.right,
|
||||||
line + row->Height());
|
line + row->Height());
|
||||||
return true;
|
return line <= fVisibleRect.bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
line += iterator.CurrentRow()->Height() + 1;
|
line += iterator.CurrentRow()->Height() + 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user