summaryrefslogtreecommitdiff
path: root/indra/newview/lllocationinputctrl.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-07-06 15:49:32 -0400
committerLoren Shih <seraph@lindenlab.com>2010-07-06 15:49:32 -0400
commit419bfb16fdd9b79d32736fd80652685a07f9e39f (patch)
tree4afafc0665ca3b486e2507369d9d214d40abf9ac /indra/newview/lllocationinputctrl.cpp
parentced040f8aef5a764c2e6fb261d5bbecd4df75064 (diff)
parent7de36b3d4217f5ceee8b46a59983229b7af35981 (diff)
automated merge
Diffstat (limited to 'indra/newview/lllocationinputctrl.cpp')
-rw-r--r--indra/newview/lllocationinputctrl.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index 53a11eff04..b8590d838e 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -231,7 +231,7 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)
params.rect(text_entry_rect);
params.default_text(LLStringUtil::null);
params.max_length_bytes(p.max_chars);
- params.keystroke_callback(boost::bind(&LLComboBox::onTextEntry, this, _1));
+ params.keystroke_callback(boost::bind(&LLLocationInputCtrl::onTextEntry, this, _1));
params.commit_on_focus_lost(false);
params.follows.flags(FOLLOWS_ALL);
mTextEntry = LLUICtrlFactory::create<LLURLLineEditor>(params);
@@ -484,13 +484,16 @@ void LLLocationInputCtrl::onTextEntry(LLLineEditor* line_editor)
KEY key = gKeyboard->currentKey();
MASK mask = gKeyboard->currentMask(TRUE);
+ // Typing? (moving cursor should not affect showing the list)
+ bool typing = mask != MASK_CONTROL && key != KEY_LEFT && key != KEY_RIGHT && key != KEY_HOME && key != KEY_END;
+ bool pasting = mask == MASK_CONTROL && key == 'V';
+
if (line_editor->getText().empty())
{
prearrangeList(); // resets filter
hideList();
}
- // Typing? (moving cursor should not affect showing the list)
- else if (mask != MASK_CONTROL && key != KEY_LEFT && key != KEY_RIGHT && key != KEY_HOME && key != KEY_END)
+ else if (typing || pasting)
{
prearrangeList(line_editor->getText());
if (mList->getItemCount() != 0)
@@ -966,7 +969,12 @@ void LLLocationInputCtrl::focusTextEntry()
// if the "select_on_focus" parameter is true it places the cursor
// at the beginning (after selecting text), thus screwing up updateSelection().
if (mTextEntry)
+ {
gFocusMgr.setKeyboardFocus(mTextEntry);
+
+ // Enable the text entry to handle accelerator keys (EXT-8104).
+ LLEditMenuHandler::gEditMenuHandler = mTextEntry;
+ }
}
void LLLocationInputCtrl::enableAddLandmarkButton(bool val)