summaryrefslogtreecommitdiff
path: root/indra/newview/lltoastalertpanel.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-12-29 11:55:20 -0800
committerJames Cook <james@lindenlab.com>2009-12-29 11:55:20 -0800
commitc2915a889987e64484c9794d55740e7f6ac8f9bd (patch)
treee09a6050829fbc4b1f8fdae03f6c12742ba903ed /indra/newview/lltoastalertpanel.cpp
parent1e9a5c21e5493ad3dabec4d032bc0a627e2f725f (diff)
parent3519435bbfeec4c838d5ffbe008d0ac7bbc085a8 (diff)
Merge viewer-2-0 into gooey
Diffstat (limited to 'indra/newview/lltoastalertpanel.cpp')
-rw-r--r--indra/newview/lltoastalertpanel.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp
index c48301fa1e..c3ccb9380b 100644
--- a/indra/newview/lltoastalertpanel.cpp
+++ b/indra/newview/lltoastalertpanel.cpp
@@ -279,7 +279,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
mLineEditor->reshape(leditor_rect.getWidth(), leditor_rect.getHeight());
mLineEditor->setRect(leditor_rect);
mLineEditor->setText(edit_text_contents);
- mLineEditor->setMaxTextLength(STD_STRING_STR_LEN);
+ mLineEditor->setMaxTextLength(STD_STRING_STR_LEN - 1);
// make sure all edit keys get handled properly (DEV-22396)
mLineEditor->setHandleEditKeysDirectly(TRUE);
@@ -385,6 +385,12 @@ BOOL LLToastAlertPanel::handleKeyHere(KEY key, MASK mask )
{
if( KEY_RETURN == key && mask == MASK_NONE )
{
+ LLButton* defaultBtn = getDefaultButton();
+ if(defaultBtn && defaultBtn->getVisible() && defaultBtn->getEnabled())
+ {
+ // If we have a default button, click it when return is pressed
+ defaultBtn->onCommit();
+ }
return TRUE;
}
else if (KEY_RIGHT == key)