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 <waddlesplash@gmail.com> Tested-by: Automation <automation@haiku-os.org> Reviewed-by: Stefano Ceccherini <stefano.ceccherini@gmail.com> Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This commit is contained in:
parent
8079adc050
commit
40e5560a3c
@ -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++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user