MAINT-3610 FIXED SL viewer partly 'eats' chat-messages

Thu, 06 Mar 2014 05:51:49 +0200

author
maksymsproductengine <maksymsproductengine@lindenlab.com>
date
Thu, 06 Mar 2014 05:51:49 +0200
changeset 43104
ff8e62707177
parent 43103
b7fc8ab4e21b
child 43105
bf8b86ab1f11

MAINT-3610 FIXED SL viewer partly 'eats' chat-messages

indra/llui/llchatentry.cpp file | annotate | diff | revisions
indra/llui/lltexteditor.cpp file | annotate | diff | revisions
indra/llui/lltexteditor.h file | annotate | diff | revisions
     1.1 --- a/indra/llui/llchatentry.cpp	Tue Jan 06 19:19:30 2015 +0100
     1.2 +++ b/indra/llui/llchatentry.cpp	Thu Mar 06 05:51:49 2014 +0200
     1.3 @@ -53,6 +53,7 @@
     1.4  	mCurrentHistoryLine = mLineHistory.begin();
     1.5  
     1.6  	mAutoIndent = false;
     1.7 +	keepSelectionOnReturn(true);
     1.8  }
     1.9  
    1.10  LLChatEntry::~LLChatEntry()
    1.11 @@ -185,15 +186,6 @@
    1.12  {
    1.13  	BOOL handled = FALSE;
    1.14  
    1.15 -    // In the case of a chat entry, pressing RETURN when something is selected
    1.16 -    // should NOT erase the selection (unlike a notecard, for example)
    1.17 -    if (key == KEY_RETURN)
    1.18 -    {
    1.19 -        endOfDoc();
    1.20 -        startSelection();
    1.21 -        endSelection();
    1.22 -    }
    1.23 -
    1.24  	LLTextEditor::handleSpecialKey(key, mask);
    1.25  
    1.26  	switch(key)
     2.1 --- a/indra/llui/lltexteditor.cpp	Tue Jan 06 19:19:30 2015 +0100
     2.2 +++ b/indra/llui/lltexteditor.cpp	Thu Mar 06 05:51:49 2014 +0200
     2.3 @@ -264,7 +264,8 @@
     2.4  	mContextMenu(NULL),
     2.5  	mShowContextMenu(p.show_context_menu),
     2.6  	mEnableTooltipPaste(p.enable_tooltip_paste),
     2.7 -	mPassDelete(FALSE)
     2.8 +	mPassDelete(FALSE),
     2.9 +	mKeepSelectionOnReturn(false)
    2.10  {
    2.11  	mSourceID.generate();
    2.12  
    2.13 @@ -1776,7 +1777,7 @@
    2.14  	case KEY_RETURN:
    2.15  		if (mask == MASK_NONE)
    2.16  		{
    2.17 -			if( hasSelection() )
    2.18 +			if( hasSelection() && !mKeepSelectionOnReturn )
    2.19  			{
    2.20  				deleteSelection(FALSE);
    2.21  			}
     3.1 --- a/indra/llui/lltexteditor.h	Tue Jan 06 19:19:30 2015 +0100
     3.2 +++ b/indra/llui/lltexteditor.h	Thu Mar 06 05:51:49 2014 +0200
     3.3 @@ -305,6 +305,7 @@
     3.4  
     3.5  	/*virtual*/ void	updateSegments();
     3.6  	void				updateLinkSegments();
     3.7 +	void				keepSelectionOnReturn(bool keep) { mKeepSelectionOnReturn = keep; }
     3.8  
     3.9  private:
    3.10  	//
    3.11 @@ -348,6 +349,7 @@
    3.12  	bool			mParseOnTheFly;
    3.13  	bool			mEnableTooltipPaste;
    3.14  	bool			mPassDelete;
    3.15 +	bool			mKeepSelectionOnReturn;	// disabling of removing selected text after pressing of Enter
    3.16  	
    3.17  	LLUUID			mSourceID;
    3.18  

mercurial