summaryrefslogtreecommitdiff
path: root/indra/llui/llmodaldialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llmodaldialog.cpp')
-rw-r--r--indra/llui/llmodaldialog.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp
index 7557b87b94..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,12 +247,6 @@ BOOL LLModalDialog::handleKeyHere(KEY key, MASK mask )
}
}
-void LLModalDialog::onClose(bool app_quitting)
-{
- stopModal();
- LLFloater::onClose(app_quitting);
-}
-
// virtual
void LLModalDialog::draw()
{