summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2011-03-21 10:38:39 -0400
committerLoren Shih <seraph@lindenlab.com>2011-03-21 10:38:39 -0400
commitbe553242ef706e33260f3f9e62d02f4720f00473 (patch)
tree553a150a63cd8105f8860780ef7d02f12a69eb23 /indra/llui
parent9c1c791b29cb5087ebff142d4ad7a55b65be0ad0 (diff)
parentdf63c6931e81c034887611711095e3134b9a7318 (diff)
Automated merge up from viewer-development into mesh-development
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llfloater.cpp7
-rw-r--r--indra/llui/llfloater.h1
-rw-r--r--indra/llui/llmenugl.cpp8
3 files changed, 14 insertions, 2 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 35e0d9d890..d19e33ea55 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -2869,7 +2869,7 @@ void LLFloater::initFromParams(const LLFloater::Params& p)
// close callback
if (p.close_callback.isProvided())
{
- mCloseSignal.connect(initCommitCallback(p.close_callback));
+ setCloseCallback(initCommitCallback(p.close_callback));
}
}
@@ -2879,6 +2879,11 @@ boost::signals2::connection LLFloater::setMinimizeCallback( const commit_signal_
return mMinimizeSignal->connect(cb);
}
+boost::signals2::connection LLFloater::setCloseCallback( const commit_signal_t::slot_type& cb )
+{
+ return mCloseSignal.connect(cb);
+}
+
LLFastTimer::DeclareTimer POST_BUILD("Floater Post Build");
bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::string& filename, LLXMLNodePtr output_node)
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 0e83b80c89..5b7b020881 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -144,6 +144,7 @@ public:
bool buildFromFile(const std::string &filename, LLXMLNodePtr output_node = NULL);
boost::signals2::connection setMinimizeCallback( const commit_signal_t::slot_type& cb );
+ boost::signals2::connection setCloseCallback( const commit_signal_t::slot_type& cb );
void initFromParams(const LLFloater::Params& p);
bool initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::string& filename, LLXMLNodePtr output_node = NULL);
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;
}