From b754aa3dbd9e51396f49613d17598b8fcde78531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 5 Apr 2007 11:16:43 +0000 Subject: [PATCH] RemoveItems() implementation was missing; more or less copied the one from BListView (which is slow, but works). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20573 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/OutlineListView.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/kits/interface/OutlineListView.cpp b/src/kits/interface/OutlineListView.cpp index c16b9f60ec..930e22bff6 100644 --- a/src/kits/interface/OutlineListView.cpp +++ b/src/kits/interface/OutlineListView.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2006, Haiku Inc. + * Copyright 2001-2007, Haiku Inc. * Distributed under the terms of the MIT License. * * Authors: @@ -282,11 +282,19 @@ BOutlineListView::RemoveItem(int32 fullIndex) bool -BOutlineListView::RemoveItems(int32 fullListIndex, int32 count) +BOutlineListView::RemoveItems(int32 fullIndex, int32 count) { - printf("BOutlineListView::RemoveItems Not implemented\n"); + if (fullIndex >= FullListCountItems()) + fullIndex = -1; + if (fullIndex < 0) + return false; - return false; + // TODO: very bad for performance!! + while (count--) { + BOutlineListView::RemoveItem(fullIndex); + } + + return true; }