BOutlineListView: fixed expansion causing items to disappear
On a multi-level list view, when expanding an item containing other collapsed lists, the last items disappear due to a wrong element counting. Change-Id: I2313ad8efb23e8db54cd3563687bf0c2a775a12a Reviewed-on: https://review.haiku-os.org/c/haiku/+/6259 Reviewed-by: waddlesplash <[email protected]> Tested-by: Automation <[email protected]> Reviewed-by: Stefano Ceccherini <[email protected]> Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
@@ -846,8 +846,10 @@ BOutlineListView::ExpandOrCollapse(BListItem* item, bool expand)
|
||||
uint32 subLevel = item->fLevel;
|
||||
items++;
|
||||
|
||||
while (--count > 0 && items[0]->fLevel > subLevel)
|
||||
while (count > 0 && items[0]->fLevel > subLevel) {
|
||||
items++;
|
||||
count--;
|
||||
}
|
||||
} else
|
||||
items++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user