diff options
author | Richard Nelson <none@none> | 2010-03-04 16:35:52 -0800 |
---|---|---|
committer | Richard Nelson <none@none> | 2010-03-04 16:35:52 -0800 |
commit | 485711e179e0ccf6351feb02318f41bbb5593662 (patch) | |
tree | 921ab16f22dfbd6e9f69166db9f22b40ada27b0f /indra | |
parent | 5208aa56bd28490084166d0f755ce8d2f0dcd5a2 (diff) |
removed extraneous updateBoundingRect() calls
remove the login progress panel as a popup only after it has finished fading out
popupview manages it's own registering and unregistering of popup callbacks
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llcombobox.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llpopupview.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llpopupview.h | 1 | ||||
-rw-r--r-- | indra/newview/llprogressview.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 2 |
5 files changed, 14 insertions, 6 deletions
diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index c679717807..9ec1a9f7c4 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -622,7 +622,7 @@ void LLComboBox::showList() LLUI::addPopup(this); setUseBoundingRect(TRUE); - updateBoundingRect(); +// updateBoundingRect(); } void LLComboBox::hideList() @@ -646,7 +646,7 @@ void LLComboBox::hideList() setUseBoundingRect(FALSE); LLUI::removePopup(this); - updateBoundingRect(); +// updateBoundingRect(); } } 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(); } } diff --git a/indra/newview/llpopupview.h b/indra/newview/llpopupview.h index 6248e9a553..1ec61d5450 100644 --- a/indra/newview/llpopupview.h +++ b/indra/newview/llpopupview.h @@ -39,6 +39,7 @@ class LLPopupView : public LLPanel { public: LLPopupView(); + ~LLPopupView(); /*virtual*/ void draw(); /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index 15831d85a0..120b584cd9 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -128,7 +128,6 @@ void LLProgressView::setVisible(BOOL visible) { if (getVisible() && !visible) { - gViewerWindow->removePopup(this); mFadeTimer.start(); } @@ -190,6 +189,8 @@ void LLProgressView::draw() // Fade is complete, release focus gFocusMgr.releaseFocusIfNeeded( this ); LLPanel::setVisible(FALSE); + gViewerWindow->removePopup(this); + gStartTexture = NULL; } return; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 1304a66397..7dd606ccda 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1368,8 +1368,6 @@ LLViewerWindow::LLViewerWindow( LLNotifications::instance().setIgnoreAllNotifications(gSavedSettings.getBOOL("IgnoreAllNotifications")); llinfos << "NOTE: ALL NOTIFICATIONS THAT OCCUR WILL GET ADDED TO IGNORE LIST FOR LATER RUNS." << llendl; - LLUI::setPopupFuncs(boost::bind(&LLViewerWindow::addPopup, this, _1), boost::bind(&LLViewerWindow::removePopup, this, _1), boost::bind(&LLViewerWindow::clearPopups, this)); - // Default to application directory. LLViewerWindow::sSnapshotBaseName = "Snapshot"; LLViewerWindow::sMovieBaseName = "SLmovie"; |