* Removing items from the BOutlineListView should longer crash the application.

* Also, the selection should be updated correctly when items are removed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16652 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-03-08 15:56:36 +00:00
parent bf2657c5d7
commit 000d23ff71
2 changed files with 74 additions and 33 deletions
+2 -3
View File
@@ -544,7 +544,6 @@ BListItem*
BListView::RemoveItem(int32 index)
{
BListItem *item = ItemAt(index);
if (!item)
return NULL;
@@ -570,7 +569,7 @@ BListView::RemoveItem(int32 index)
bool
BListView::RemoveItem(BListItem *item)
{
return RemoveItem(IndexOf(item)) != NULL;
return BListView::RemoveItem(IndexOf(item)) != NULL;
}
// RemoveItems
@@ -585,7 +584,7 @@ BListView::RemoveItems(int32 index, int32 count)
// TODO: very bad for performance!!
while (count--)
RemoveItem(index);
BListView::RemoveItem(index);
return true;
}