diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-04 15:31:19 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-04 15:31:19 -0800 |
commit | c9868071b113b251e03d95163118b696e28bbe98 (patch) | |
tree | 8428d2e97f7a61b1a10e7e10494199a39969369d /indra/newview/lltoastalertpanel.cpp | |
parent | e833e7ad442f5b59f95c6ccfcaaf1d103d247d69 (diff) | |
parent | e8659e0e13c65308ad2f036dc7e7ccff0e665976 (diff) |
Merge from trunk. Conflicts manually resolved in:
U indra/llui/lluictrlfactory.cpp
U indra/newview/llinventorybridge.cpp
U indra/newview/llviewertexture.cpp
U indra/newview/llviewertexture.h
Diffstat (limited to 'indra/newview/lltoastalertpanel.cpp')
-rw-r--r-- | indra/newview/lltoastalertpanel.cpp | 8 |
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) |