diff options
author | Oz Linden <oz@lindenlab.com> | 2011-04-03 09:37:03 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-04-03 09:37:03 -0400 |
commit | b8e97adced58f81a52e6b76a14309d275d55c8bc (patch) | |
tree | 9f2710cbb13093c509896f184a025ab7469c934c /indra/llui | |
parent | abc259618f06f69ba8e7c72cb149bcddc1bb6ddf (diff) | |
parent | e58c809a5816383674d0f1957440fad728e88893 (diff) |
merge changes for OPEN-39
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llmenugl.cpp | 8 | ||||
-rw-r--r-- | indra/llui/tests/llurlentry_stub.cpp | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 32d7be377a..f0374de98f 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -1936,9 +1936,15 @@ bool LLMenuGL::scrollItems(EScrollingDirection direction) { item_list_t::reverse_iterator first_visible_item_iter = mItems.rend(); + // Need to scroll through number of actual existing items in menu. + // Otherwise viewer will hang for a time needed to scroll U32_MAX + // times in std::advance(). STORM-659. + size_t nitems = mItems.size(); + U32 scrollable_items = nitems < mMaxScrollableItems ? nitems : mMaxScrollableItems; + // Advance by mMaxScrollableItems back from the end of the list // to make the last item visible. - std::advance(first_visible_item_iter, mMaxScrollableItems); + std::advance(first_visible_item_iter, scrollable_items); mFirstVisibleItem = *first_visible_item_iter; break; } diff --git a/indra/llui/tests/llurlentry_stub.cpp b/indra/llui/tests/llurlentry_stub.cpp index 966bea329c..ac2412c928 100644 --- a/indra/llui/tests/llurlentry_stub.cpp +++ b/indra/llui/tests/llurlentry_stub.cpp @@ -193,8 +193,8 @@ LLFontGL* LLFontGL::getFontDefault() return NULL; } -char* _PREHASH_AgentData = (char *)"AgentData"; -char* _PREHASH_AgentID = (char *)"AgentID"; +char const* const _PREHASH_AgentData = (char *)"AgentData"; +char const* const _PREHASH_AgentID = (char *)"AgentID"; LLHost LLHost::invalid(INVALID_PORT,INVALID_HOST_IP_ADDRESS); |