MAINT-3610 FIXED SL viewer partly 'eats' chat-messages
parent
1efba4dad8
commit
faa17c76c9
|
|
@ -53,6 +53,7 @@ LLChatEntry::LLChatEntry(const Params& p)
|
|||
mCurrentHistoryLine = mLineHistory.begin();
|
||||
|
||||
mAutoIndent = false;
|
||||
keepSelectionOnReturn(true);
|
||||
}
|
||||
|
||||
LLChatEntry::~LLChatEntry()
|
||||
|
|
@ -185,15 +186,6 @@ BOOL LLChatEntry::handleSpecialKey(const KEY key, const MASK mask)
|
|||
{
|
||||
BOOL handled = FALSE;
|
||||
|
||||
// In the case of a chat entry, pressing RETURN when something is selected
|
||||
// should NOT erase the selection (unlike a notecard, for example)
|
||||
if (key == KEY_RETURN)
|
||||
{
|
||||
endOfDoc();
|
||||
startSelection();
|
||||
endSelection();
|
||||
}
|
||||
|
||||
LLTextEditor::handleSpecialKey(key, mask);
|
||||
|
||||
switch(key)
|
||||
|
|
|
|||
|
|
@ -264,7 +264,8 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) :
|
|||
mContextMenu(NULL),
|
||||
mShowContextMenu(p.show_context_menu),
|
||||
mEnableTooltipPaste(p.enable_tooltip_paste),
|
||||
mPassDelete(FALSE)
|
||||
mPassDelete(FALSE),
|
||||
mKeepSelectionOnReturn(false)
|
||||
{
|
||||
mSourceID.generate();
|
||||
|
||||
|
|
@ -1776,7 +1777,7 @@ BOOL LLTextEditor::handleSpecialKey(const KEY key, const MASK mask)
|
|||
case KEY_RETURN:
|
||||
if (mask == MASK_NONE)
|
||||
{
|
||||
if( hasSelection() )
|
||||
if( hasSelection() && !mKeepSelectionOnReturn )
|
||||
{
|
||||
deleteSelection(FALSE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -305,6 +305,7 @@ protected:
|
|||
|
||||
/*virtual*/ void updateSegments();
|
||||
void updateLinkSegments();
|
||||
void keepSelectionOnReturn(bool keep) { mKeepSelectionOnReturn = keep; }
|
||||
|
||||
private:
|
||||
//
|
||||
|
|
@ -348,6 +349,7 @@ private:
|
|||
bool mParseOnTheFly;
|
||||
bool mEnableTooltipPaste;
|
||||
bool mPassDelete;
|
||||
bool mKeepSelectionOnReturn; // disabling of removing selected text after pressing of Enter
|
||||
|
||||
LLUUID mSourceID;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue