diff options
Diffstat (limited to 'indra/newview/llpopupview.cpp')
-rw-r--r-- | indra/newview/llpopupview.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/newview/llpopupview.cpp b/indra/newview/llpopupview.cpp index d9e4ebcd3c..590a45c96c 100644 --- a/indra/newview/llpopupview.cpp +++ b/indra/newview/llpopupview.cpp @@ -48,6 +48,14 @@ bool view_visible(LLView* viewp) LLPopupView::LLPopupView() { + // register ourself as handler of UI popups + LLUI::setPopupFuncs(boost::bind(&LLPopupView::addPopup, this, _1), boost::bind(&LLPopupView::removePopup, this, _1), boost::bind(&LLPopupView::clearPopups, this)); +} + +LLPopupView::~LLPopupView() +{ + // set empty callback function so we can't handle popups anymore + LLUI::setPopupFuncs(LLUI::add_popup_t(), LLUI::remove_popup_t(), LLUI::clear_popups_t()); } void LLPopupView::draw() @@ -212,8 +220,8 @@ void LLPopupView::removePopup(LLView* popup) { gFocusMgr.setKeyboardFocus(NULL); } - popup->onTopLost(); mPopups.erase(std::find(mPopups.begin(), mPopups.end(), popup->getHandle())); + popup->onTopLost(); } } |