Set fValue and fLimit to be 0 in the MenuScrollView contructor.

This commit is contained in:
John Scipione 2012-07-22 17:26:38 -04:00
parent afa1c29104
commit d7b5131b1a

View File

@ -164,7 +164,9 @@ BMenuScrollView::BMenuScrollView(BRect frame, BMenu* menu)
fMenu(menu), fMenu(menu),
fUpperScroller(NULL), fUpperScroller(NULL),
fLowerScroller(NULL), fLowerScroller(NULL),
fScrollStep(kDefaultScrollStep) fScrollStep(kDefaultScrollStep),
fValue(0),
fLimit(0)
{ {
} }
@ -279,8 +281,8 @@ BMenuScrollView::DetachScrollers()
if (fMenu) { if (fMenu) {
// We don't remember the position where the last scrolling // We don't remember the position where the last scrolling
// ended, so scroll back to the beginning. // ended, so scroll back to the beginning.
fMenu->ScrollTo(0, 0);
fMenu->MoveBy(0, -kScrollerHeight); fMenu->MoveBy(0, -kScrollerHeight);
fMenu->ScrollTo(0, 0);
fValue = 0; fValue = 0;
} }
} }