diff options
| author | richard <none@none> | 2009-10-30 17:46:28 -0700 |
|---|---|---|
| committer | richard <none@none> | 2009-10-30 17:46:28 -0700 |
| commit | c964f281906e760c88c4f01edc566df35291ddff (patch) | |
| tree | 431bef201d87f3628c9702a5ec73ca8737d198b5 /indra/llui/lltexteditor.cpp | |
| parent | 123db56856ef0451e28fe7ac7ce3bcc27d3066f1 (diff) | |
| parent | b82bda605d85fe9b1ad69ce36a36de18a2924924 (diff) | |
merge
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
| -rw-r--r-- | indra/llui/lltexteditor.cpp | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index f0238dba49..3ce5a0320b 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -652,6 +652,13 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask) { BOOL handled = FALSE; + // set focus first, in case click callbacks want to change it + // RN: do we really need to have a tab stop? + if (hasTabStop()) + { + setFocus( TRUE ); + } + // Let scrollbar have first dibs handled = LLTextBase::handleMouseDown(x, y, mask); @@ -694,12 +701,6 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask) handled = TRUE; } - if (hasTabStop()) - { - setFocus( TRUE ); - handled = TRUE; - } - // Delay cursor flashing resetCursorBlink(); @@ -708,29 +709,32 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask) BOOL LLTextEditor::handleRightMouseDown(S32 x, S32 y, MASK mask) { - BOOL handled = LLTextBase::handleRightMouseDown(x, y, mask); - if (!handled && hasTabStop()) + if (hasTabStop()) + { + setFocus(TRUE); + } + if (!LLTextBase::handleRightMouseDown(x, y, mask)) { - setFocus( TRUE ); showContextMenu(x, y); - handled = TRUE; } - return handled; + return TRUE; } BOOL LLTextEditor::handleMiddleMouseDown(S32 x, S32 y, MASK mask) { - BOOL handled = FALSE; - handled = LLTextBase::handleMouseDown(x, y, mask); + if (hasTabStop()) + { + setFocus(TRUE); + } - if (!handled) + if (!LLTextBase::handleMouseDown(x, y, mask)) { - setFocus( TRUE ); if( canPastePrimary() ) { setCursorAtLocalPos( x, y, true ); + // does not rely on focus being set pastePrimary(); } } |
