diff options
author | Richard Nelson <richard@lindenlab.com> | 2011-10-12 13:50:32 -0700 |
---|---|---|
committer | Richard Nelson <richard@lindenlab.com> | 2011-10-12 13:50:32 -0700 |
commit | cc839191a86f9cdeea4449e6b097c0661b0da03e (patch) | |
tree | 36abd1cfdcf218218439cf68a795ff20245ab6ec /indra/llui/llfloater.cpp | |
parent | 64ae4d14627a81dfbd6bbe25273e32bf1a1ad8b6 (diff) | |
parent | a1f0101ca293768a37889856b1dde69110b30b7c (diff) |
Automated merge with ssh://hg.lindenlab.com/richard/viewer-experience-fui
Diffstat (limited to 'indra/llui/llfloater.cpp')
-rw-r--r-- | indra/llui/llfloater.cpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 0398c0d7eb..4bcc7c6fe0 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -2506,6 +2506,52 @@ void LLFloaterView::closeAllChildren(bool app_quitting) } } +void LLFloaterView::hiddenFloaterClosed(LLFloater* floater) +{ + for (hidden_floaters_t::iterator it = mHiddenFloaters.begin(), end_it = mHiddenFloaters.end(); + it != end_it; + ++it) + { + if (it->first.get() == floater) + { + it->second.disconnect(); + mHiddenFloaters.erase(it); + break; + } + } +} + +void LLFloaterView::hideAllFloaters() +{ + child_list_t child_list = *(getChildList()); + + for (child_list_iter_t it = child_list.begin(); it != child_list.end(); ++it) + { + LLFloater* floaterp = dynamic_cast<LLFloater*>(*it); + if (floaterp && floaterp->getVisible()) + { + floaterp->setVisible(false); + boost::signals2::connection connection = floaterp->mCloseSignal.connect(boost::bind(&LLFloaterView::hiddenFloaterClosed, this, floaterp)); + mHiddenFloaters.push_back(std::make_pair(floaterp->getHandle(), connection)); + } + } +} + +void LLFloaterView::showHiddenFloaters() +{ + for (hidden_floaters_t::iterator it = mHiddenFloaters.begin(), end_it = mHiddenFloaters.end(); + it != end_it; + ++it) + { + LLFloater* floaterp = it->first.get(); + if (floaterp) + { + floaterp->setVisible(true); + } + it->second.disconnect(); + } + mHiddenFloaters.clear(); +} BOOL LLFloaterView::allChildrenClosed() { |