From 67e4704330a7105b415910c974d70f31d9730287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sun, 14 Oct 2007 11:23:40 +0000 Subject: [PATCH] MakeEmpty() now also calls _FixupScrollBar() - this fixes bug #1558. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22550 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/ListView.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/kits/interface/ListView.cpp b/src/kits/interface/ListView.cpp index 9139606322..37a0db0ec3 100644 --- a/src/kits/interface/ListView.cpp +++ b/src/kits/interface/ListView.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001-2006, Haiku, Inc. + * Copyright (c) 2001-2007, Haiku, Inc. * Distributed under the terms of the MIT license. * * Authors: @@ -737,10 +737,16 @@ BListView::CountItems() const void BListView::MakeEmpty() { + if (fList.IsEmpty()) + return; + _DeselectAll(-1, -1); fList.MakeEmpty(); - Invalidate(); + if (Window()) { + _FixupScrollBar(); + Invalidate(); + } } // IsEmpty