summaryrefslogtreecommitdiff
path: root/indra/llui/lltexteditor.cpp
diff options
context:
space:
mode:
authorrichard <none@none>2009-10-30 11:43:45 -0700
committerrichard <none@none>2009-10-30 11:43:45 -0700
commit0d9682113d28b9814374a784a9724aa1ba4bb942 (patch)
tree2c627e5da47f695129fce129a1278673263189a2 /indra/llui/lltexteditor.cpp
parent95031093c795f3a97cdc673c7b7807c944742ab8 (diff)
EXT-1980 - Bottom bar buttons retain highlight
EXT-1936 - [BSI] Reversion - clicking on avatar name in group chat should bring up profile also fixed buttons not working on avatar list in IM window reviewed by Leyla
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rw-r--r--indra/llui/lltexteditor.cpp34
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();
}
}