* AddItem() versions did not work correctly at all: maximum insertion index
was limited by the visible list count, it did not care if the insertion failed, it didn't maintain the BListItem::fHasSubitems field, neither fVisible, and it didn't invalidate the latch of the parent, if needed. * The "add item at end" also did not care if the item should be added to the visible list, too, it always did. * AddUnder() would have crashed with a NULL superitem. * _RemoveItem() now updates the fHasSubitems field as well. * _SuperitemForIndex() can now return the index of the superitem as well. * SortItemsUnder() did not check if the "underItem" if the items should be added to the visible list or not, it also just did. * SortItemsUnder() now invalidates the part of the visible list that may have been changed. * This fixed bug #662, and possibly #663, too (at least I could never reproduce it). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17812 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -126,8 +126,9 @@ class BOutlineListView : public BListView {
|
||||
bool OutlineMoveItem(int32 from, int32 to);
|
||||
bool OutlineReplaceItem(int32 index, BListItem* item);
|
||||
void CommonMoveItems(int32 from, int32 count, int32 to);
|
||||
BListItem* SuperitemForIndex(int32 fullListIndex, int32 level);
|
||||
int32 FindPreviousVisibleIndex(int32 fullListIndex);
|
||||
BListItem* _SuperitemForIndex(int32 fullListIndex, int32 level,
|
||||
int32* _superIndex = NULL);
|
||||
int32 _FindPreviousVisibleIndex(int32 fullListIndex);
|
||||
|
||||
private:
|
||||
BList fFullList;
|
||||
|
||||
Reference in New Issue
Block a user