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:
David Murphy 2018-09-11 16:51:27 -04:00 committed by Augustin Cavalier
parent 74e882b39b
commit 81d0a0e0a7

View File

@ -4561,13 +4561,11 @@ OutlineView::FindVisibleRect(BRow* row, BRect* _rect)
float line = 0.0;
for (RecursiveOutlineIterator iterator(&fRows); iterator.CurrentRow();
iterator.GoToNext()) {
if (line > fVisibleRect.bottom)
break;
if (iterator.CurrentRow() == row) {
_rect->Set(fVisibleRect.left, line, fVisibleRect.right,
line + row->Height());
return true;
return line <= fVisibleRect.bottom;
}
line += iterator.CurrentRow()->Height() + 1;