From 4e0a1b40ad4f20355ebcd6133a50282d75f150e8 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Wed, 19 Nov 2008 05:11:37 +0000 Subject: [PATCH] Temporarily revert that last change since it breaks the IM Kit's preflet for reasons I don't yet understand. Investigating. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28695 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/ListView.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/kits/interface/ListView.cpp b/src/kits/interface/ListView.cpp index 761f81f226..8b5025f1f9 100644 --- a/src/kits/interface/ListView.cpp +++ b/src/kits/interface/ListView.cpp @@ -733,13 +733,7 @@ BListView::ItemAt(int32 index) const int32 BListView::IndexOf(BListItem *item) const { - if (item != NULL) { - BPoint point(0.0, item->Top()); - int32 index = IndexOf(point); - if (index >= 0 && fList.ItemAt(index) == item) - return index; - } - return -1; + return fList.IndexOf(item); } // IndexOf @@ -785,7 +779,7 @@ BListView::LastItem() const bool BListView::HasItem(BListItem *item) const { - return IndexOf(item) != -1; + return fList.HasItem(item); } // CountItems @@ -1350,9 +1344,10 @@ BListView::_FontChanged() { BFont font; GetFont(&font); - for (int32 i = 0; i < CountItems(); i++) + for (int32 i = 0; i < CountItems(); i++) { + ItemAt(i)->SetTop((i > 0) ? ItemAt(i - 1)->Bottom() + 1.0 : 0.0); ItemAt(i)->Update(this, &font); - _RecalcItemTops(0); + } }