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
This commit is contained in:
Philippe Saint-Pierre
2009-05-10 04:04:06 +00:00
parent e3bf105abf
commit 91ad692e57
+1 -1
View File
@@ -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)