From 91ad692e57495adc80c6527bcccc0e9f19d3ca53 Mon Sep 17 00:00:00 2001 From: Philippe Saint-Pierre Date: Sun, 10 May 2009 04:04:06 +0000 Subject: [PATCH] Make ScrollToSelection() use "Contains" rather than an "Intersects" to determine if it should scroll. This make the end key work (trigger the scroll) if the last item is overlapping the bottom boundary. This fixes bug #1820. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30689 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/ListView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kits/interface/ListView.cpp b/src/kits/interface/ListView.cpp index f59bb12c0c..b9e7863315 100644 --- a/src/kits/interface/ListView.cpp +++ b/src/kits/interface/ListView.cpp @@ -880,7 +880,7 @@ BListView::ScrollToSelection() { BRect itemFrame = ItemFrame(CurrentSelection(0)); - if (Bounds().Intersects(itemFrame.InsetByCopy(0.0f, 2.0f))) + if (Bounds().Contains(itemFrame)) return; if (itemFrame.top < Bounds().top)