summaryrefslogtreecommitdiff
path: root/indra/llui/llmodaldialog.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-02-19 21:42:32 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-02-19 21:42:32 +0000
commit2e32d44e7165775936beae5d9ef636ff9d3f2bd2 (patch)
tree8153bc399994aabf6e1c41c2d8332e4e8c4ddb78 /indra/llui/llmodaldialog.cpp
parentdb0f5847ea8b96b3c1ac08e7aeb43d83daacb8e4 (diff)
merge svn+ssh://svn.lindenlab.com/svn/linden/qa/combo-merge-ui-2008-02-13 -r 79986 : 80178 -> release.
QAR-290 = QAR-271 + QAR-191
Diffstat (limited to 'indra/llui/llmodaldialog.cpp')
-rw-r--r--indra/llui/llmodaldialog.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp
index af14ec418f..a150d295e5 100644
--- a/indra/llui/llmodaldialog.cpp
+++ b/indra/llui/llmodaldialog.cpp
@@ -74,10 +74,10 @@ LLModalDialog::~LLModalDialog()
void LLModalDialog::open() /* Flawfinder: ignore */
{
// SJB: Hack! Make sure we don't ever host a modal dialog
- LLMultiFloater* thost = LLFloater::sHostp;
- LLFloater::sHostp = NULL;
+ LLMultiFloater* thost = LLFloater::getFloaterHost();
+ LLFloater::setFloaterHost(NULL);
LLFloater::open();
- LLFloater::sHostp = thost;
+ LLFloater::setFloaterHost(thost);
}
void LLModalDialog::reshape(S32 width, S32 height, BOOL called_from_parent)
@@ -157,14 +157,18 @@ void LLModalDialog::setVisible( BOOL visible )
BOOL LLModalDialog::handleMouseDown(S32 x, S32 y, MASK mask)
{
- if (!LLFloater::handleMouseDown(x, y, mask))
+ if (mModal)
{
- if (mModal)
+ if (!LLFloater::handleMouseDown(x, y, mask))
{
// Click was outside the panel
make_ui_sound("UISndInvalidOp");
}
}
+ else
+ {
+ LLFloater::handleMouseDown(x, y, mask);
+ }
return TRUE;
}
@@ -247,7 +251,7 @@ void LLModalDialog::draw()
LLColor4 shadow_color = LLUI::sColorsGroup->getColor("ColorDropShadow");
S32 shadow_lines = LLUI::sConfigGroup->getS32("DropShadowFloater");
- gl_drop_shadow( 0, mRect.getHeight(), mRect.getWidth(), 0,
+ gl_drop_shadow( 0, getRect().getHeight(), getRect().getWidth(), 0,
shadow_color, shadow_lines);
LLFloater::draw();
@@ -276,11 +280,7 @@ void LLModalDialog::draw()
void LLModalDialog::centerOnScreen()
{
LLVector2 window_size = LLUI::getWindowSize();
-
- S32 dialog_left = (llround(window_size.mV[VX]) - mRect.getWidth()) / 2;
- S32 dialog_bottom = (llround(window_size.mV[VY]) - mRect.getHeight()) / 2;
-
- translate( dialog_left - mRect.mLeft, dialog_bottom - mRect.mBottom );
+ centerWithin(LLRect(0, 0, llround(window_size.mV[VX]), llround(window_size.mV[VY])));
}
@@ -319,3 +319,4 @@ void LLModalDialog::onAppFocusGained()
}
+