diff options
Diffstat (limited to 'indra/llui/llmodaldialog.cpp')
-rw-r--r-- | indra/llui/llmodaldialog.cpp | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp index 8779eee28d..11fa290de1 100644 --- a/indra/llui/llmodaldialog.cpp +++ b/indra/llui/llmodaldialog.cpp @@ -44,12 +44,11 @@ // static std::list<LLModalDialog*> LLModalDialog::sModalStack; -LLModalDialog::LLModalDialog( const std::string& title, S32 width, S32 height, BOOL modal ) - : LLFloater(), +LLModalDialog::LLModalDialog( const LLSD& key, S32 width, S32 height, BOOL modal ) + : LLFloater(key), mModal( modal ) { setRect(LLRect( 0, height, width, 0 )); - setTitle(title); if (modal) { setCanMinimize(FALSE); @@ -59,6 +58,7 @@ LLModalDialog::LLModalDialog( const std::string& title, S32 width, S32 height, B setBackgroundVisible(TRUE); setBackgroundOpaque(TRUE); centerOnScreen(); // default position + mCloseSignal.connect(boost::bind(&LLModalDialog::stopModal, this)); } LLModalDialog::~LLModalDialog() @@ -68,6 +68,18 @@ LLModalDialog::~LLModalDialog() { gFocusMgr.unlockFocus(); } + + std::list<LLModalDialog*>::iterator iter = std::find(sModalStack.begin(), sModalStack.end(), this); + if (iter != sModalStack.end()) + { + llerrs << "Attempt to delete dialog while still in sModalStack!" << llendl; + } +} + +// virtual +BOOL LLModalDialog::postBuild() +{ + return LLFloater::postBuild(); } // virtual @@ -235,16 +247,10 @@ BOOL LLModalDialog::handleKeyHere(KEY key, MASK mask ) } } -void LLModalDialog::onClose(bool app_quitting) -{ - stopModal(); - LLFloater::onClose(app_quitting); -} - // virtual void LLModalDialog::draw() { - static LLUICachedControl<LLColor4> shadow_color ("ColorDropShadow", *(new LLColor4)); + static LLUIColor shadow_color = LLUIColorTable::instance().getColor("ColorDropShadow"); static LLUICachedControl<S32> shadow_lines ("DropShadowFloater", 0); gl_drop_shadow( 0, getRect().getHeight(), getRect().getWidth(), 0, |