Commits

leyla_linden committed 46432f6 Merge

merge

  • Participants
  • Parent commits e627c30, d9e21c9

Comments (0)

Files changed (3)

indra/llui/llmenugl.cpp

 	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;
 	S32 mouse_x, mouse_y;
 
 	// Resetting scrolling position
-	if (menu->isScrollable())
+	if (menu->isScrollable() && menu->isScrollPositionOnShowReset())
 	{
 		menu->mFirstVisibleItem = NULL;
 	}

indra/llui/llmenugl.h

 
 	static class LLMenuHolderGL* sMenuContainer;
 	
+	void resetScrollPositionOnShow(bool reset_scroll_pos) { mResetScrollPositionOnShow = reset_scroll_pos; }
+	bool isScrollPositionOnShowReset() { return mResetScrollPositionOnShow; }
+
 protected:
 	void createSpilloverBranch();
 	void cleanupSpilloverBranch();
 	KEY				mJumpKey;
 	BOOL			mCreateJumpKeys;
 	S32				mShortcutPad;
+	bool			mResetScrollPositionOnShow;
 }; // end class LLMenuGL
 
 

indra/newview/llfavoritesbar.cpp

 	LLToggleableMenu* menu = (LLToggleableMenu*) mOverflowMenuHandle.get();
 	if (mRestoreOverflowMenu && menu && !menu->getVisible())
 	{
+		menu->resetScrollPositionOnShow(false);
 		showDropDownMenu();
+		menu->resetScrollPositionOnShow(true);
 	}
 }