EXP-1472 FIXED (More spillover list scrolls up after selecting any content menu item)
- Saving last scroll position of menumeow-7.2.2
parent
d86def6f03
commit
ba2fa73aaa
|
|
@ -1686,7 +1686,8 @@ LLMenuGL::LLMenuGL(const LLMenuGL::Params& p)
|
|||
mSpilloverMenu(NULL),
|
||||
mJumpKey(p.jump_key),
|
||||
mCreateJumpKeys(p.create_jump_keys),
|
||||
mNeedsArrange(FALSE),
|
||||
mNeedsArrange(FALSE),
|
||||
mResetScrollPositionOnShow(true),
|
||||
mShortcutPad(p.shortcut_pad)
|
||||
{
|
||||
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
|
||||
|
|
@ -3043,7 +3044,7 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y)
|
|||
S32 mouse_x, mouse_y;
|
||||
|
||||
// Resetting scrolling position
|
||||
if (menu->isScrollable())
|
||||
if (menu->isScrollable() && menu->isScrollPositionOnShowReset())
|
||||
{
|
||||
menu->mFirstVisibleItem = NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -516,6 +516,9 @@ public:
|
|||
|
||||
static class LLMenuHolderGL* sMenuContainer;
|
||||
|
||||
void resetScrollPositionOnShow(bool reset_scroll_pos) { mResetScrollPositionOnShow = reset_scroll_pos; }
|
||||
bool isScrollPositionOnShowReset() { return mResetScrollPositionOnShow; }
|
||||
|
||||
protected:
|
||||
void createSpilloverBranch();
|
||||
void cleanupSpilloverBranch();
|
||||
|
|
@ -565,6 +568,7 @@ private:
|
|||
KEY mJumpKey;
|
||||
BOOL mCreateJumpKeys;
|
||||
S32 mShortcutPad;
|
||||
bool mResetScrollPositionOnShow;
|
||||
}; // end class LLMenuGL
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1197,7 +1197,9 @@ void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata)
|
|||
LLToggleableMenu* menu = (LLToggleableMenu*) mOverflowMenuHandle.get();
|
||||
if (mRestoreOverflowMenu && menu && !menu->getVisible())
|
||||
{
|
||||
menu->resetScrollPositionOnShow(false);
|
||||
showDropDownMenu();
|
||||
menu->resetScrollPositionOnShow(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue