summaryrefslogtreecommitdiff
path: root/indra/llui/lltexteditor.cpp
diff options
context:
space:
mode:
authorJosh Bell <josh@lindenlab.com>2007-03-31 01:41:19 +0000
committerJosh Bell <josh@lindenlab.com>2007-03-31 01:41:19 +0000
commitea8fb7238e6f12383ee4bc081475fa6235637581 (patch)
treef384da93c884353bef55cf887f6c86f2081db271 /indra/llui/lltexteditor.cpp
parentffc6680d956069625fc1fe5da133bdf7922cea83 (diff)
svn merge -r 59364:59813 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance --> release
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rw-r--r--indra/llui/lltexteditor.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index de34aabb1f..366b1956c4 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -1182,7 +1182,7 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
setCursorAtLocalPos( x, y, TRUE );
startSelection();
}
- gFocusMgr.setMouseCapture( this, &LLTextEditor::onMouseCaptureLost );
+ gFocusMgr.setMouseCapture( this );
}
handled = TRUE;
@@ -1208,7 +1208,7 @@ BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask)
mHoverSegment = NULL;
if( getVisible() )
{
- if(gFocusMgr.getMouseCapture() == this )
+ if(hasMouseCapture() )
{
if( mIsSelecting )
{
@@ -1341,9 +1341,9 @@ BOOL LLTextEditor::handleMouseUp(S32 x, S32 y, MASK mask)
// Delay cursor flashing
mKeystrokeTimer.reset();
- if( gFocusMgr.getMouseCapture() == this )
+ if( hasMouseCapture() )
{
- gFocusMgr.setMouseCapture( NULL, NULL );
+ gFocusMgr.setMouseCapture( NULL );
handled = TRUE;
}
@@ -2454,6 +2454,8 @@ void LLTextEditor::onFocusLost()
// Make sure cursor is shown again
getWindow()->showCursorFromMouseMove();
+
+ LLUICtrl::onFocusLost();
}
void LLTextEditor::setEnabled(BOOL enabled)
@@ -3734,11 +3736,9 @@ S32 LLTextEditor::getSegmentIdxAtOffset(S32 offset)
}
}
-//static
-void LLTextEditor::onMouseCaptureLost( LLMouseHandler* old_captor )
+void LLTextEditor::onMouseCaptureLost()
{
- LLTextEditor* self = (LLTextEditor*) old_captor;
- self->endSelection();
+ endSelection();
}
void LLTextEditor::setOnScrollEndCallback(void (*callback)(void*), void* userdata)