diff options
Diffstat (limited to 'indra')
| -rwxr-xr-x | indra/llui/llsearcheditor.cpp | 13 | ||||
| -rwxr-xr-x | indra/llui/llsearcheditor.h | 2 | ||||
| -rwxr-xr-x | indra/newview/llfloaterworldmap.cpp | 6 | 
3 files changed, 18 insertions, 3 deletions
diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp index ea96fc573d..1fdd05a11c 100755 --- a/indra/llui/llsearcheditor.cpp +++ b/indra/llui/llsearcheditor.cpp @@ -29,6 +29,7 @@  #include "linden_common.h"  #include "llsearcheditor.h" +#include "llkeyboard.h"  LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p)  :	LLUICtrl(p), @@ -166,4 +167,16 @@ void LLSearchEditor::handleKeystroke()  	{  		mKeystrokeCallback(this, getValue());  	} + +	KEY key = gKeyboard->currentKey(); +	if (key == KEY_LEFT || +		key == KEY_RIGHT) +	{ +			return; +	} + +	if (mTextChangedCallback) +	{ +		mTextChangedCallback(this, getValue()); +	}  } diff --git a/indra/llui/llsearcheditor.h b/indra/llui/llsearcheditor.h index c2d7916938..3b12868225 100755 --- a/indra/llui/llsearcheditor.h +++ b/indra/llui/llsearcheditor.h @@ -82,12 +82,14 @@ public:  	virtual void	setFocus( BOOL b );  	void			setKeystrokeCallback( commit_callback_t cb ) { mKeystrokeCallback = cb; } +	void			setTextChangedCallback( commit_callback_t cb ) { mTextChangedCallback = cb; }  protected:  	void onClearButtonClick(const LLSD& data);  	virtual void handleKeystroke();  	commit_callback_t mKeystrokeCallback; +	commit_callback_t mTextChangedCallback;  	LLLineEditor* mSearchEditor;  	LLButton* mSearchButton;  	LLButton* mClearButton; diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 6837f6159f..250f8e557f 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -284,12 +284,12 @@ BOOL LLFloaterWorldMap::postBuild()  	LLComboBox *avatar_combo = getChild<LLComboBox>("friend combo");  	avatar_combo->selectFirstItem();  	avatar_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onAvatarComboPrearrange, this) ); -	avatar_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) ); +	avatar_combo->setTextChangedCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );  	mListFriendCombo = dynamic_cast<LLCtrlListInterface *>(avatar_combo);  	LLSearchEditor *location_editor = getChild<LLSearchEditor>("location");  	location_editor->setFocusChangedCallback(boost::bind(&LLFloaterWorldMap::onLocationFocusChanged, this, _1)); -	location_editor->setKeystrokeCallback( boost::bind(&LLFloaterWorldMap::onSearchTextEntry, this)); +	location_editor->setTextChangedCallback( boost::bind(&LLFloaterWorldMap::onSearchTextEntry, this));  	getChild<LLScrollListCtrl>("search_results")->setDoubleClickCallback( boost::bind(&LLFloaterWorldMap::onClickTeleportBtn, this));  	mListSearchResults = childGetListInterface("search_results"); @@ -297,7 +297,7 @@ BOOL LLFloaterWorldMap::postBuild()  	LLComboBox *landmark_combo = getChild<LLComboBox>( "landmark combo");  	landmark_combo->selectFirstItem();  	landmark_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onLandmarkComboPrearrange, this) ); -	landmark_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) ); +	landmark_combo->setTextChangedCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );  	mListLandmarkCombo = dynamic_cast<LLCtrlListInterface *>(landmark_combo);  	mCurZoomVal = log(LLWorldMapView::sMapScale)/log(2.f);  | 
