MAINT-4853 FIXED Pressing the ENTER key when entering a location into the Type a location field, doesn't log you in
parent
38000f8f18
commit
cccdd1fb39
|
|
@ -788,6 +788,11 @@ BOOL LLComboBox::handleKeyHere(KEY key, MASK mask)
|
|||
// since the dropdown button eats the key
|
||||
if (key == KEY_RETURN)
|
||||
{
|
||||
if (mask == MASK_NONE)
|
||||
{
|
||||
mOnReturnSignal(this, getValue());
|
||||
}
|
||||
|
||||
// don't show list and don't eat key input when committing
|
||||
// free-form text entry with RETURN since user already knows
|
||||
// what they are trying to select
|
||||
|
|
|
|||
|
|
@ -199,6 +199,11 @@ public:
|
|||
void setTextEntryCallback( commit_callback_t cb ) { mTextEntryCallback = cb; }
|
||||
void setTextChangedCallback( commit_callback_t cb ) { mTextChangedCallback = cb; }
|
||||
|
||||
/**
|
||||
* Connects callback to signal called when Return key is pressed.
|
||||
*/
|
||||
boost::signals2::connection setReturnCallback( const commit_signal_t::slot_type& cb ) { return mOnReturnSignal.connect(cb); }
|
||||
|
||||
void setButtonVisible(BOOL visible);
|
||||
|
||||
void onButtonMouseDown();
|
||||
|
|
@ -231,6 +236,7 @@ private:
|
|||
commit_callback_t mTextChangedCallback;
|
||||
commit_callback_t mSelectionCallback;
|
||||
boost::signals2::connection mTopLostSignalConnection;
|
||||
commit_signal_t mOnReturnSignal;
|
||||
S32 mLastSelectedIndex;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
|
|||
|
||||
LLComboBox* favorites_combo = getChild<LLComboBox>("start_location_combo");
|
||||
updateLocationSelectorsVisibility(); // separate so that it can be called from preferences
|
||||
favorites_combo->setCommitCallback(boost::bind(&LLPanelLogin::onClickConnect, this));
|
||||
favorites_combo->setReturnCallback(boost::bind(&LLPanelLogin::onClickConnect, this));
|
||||
favorites_combo->setFocusLostCallback(boost::bind(&LLPanelLogin::onLocationSLURL, this));
|
||||
|
||||
LLComboBox* server_choice_combo = getChild<LLComboBox>("server_combo");
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@
|
|||
label="My favorite places"
|
||||
height="32"
|
||||
max_chars="128"
|
||||
combo_editor.font="SansSerifMedium"
|
||||
combo_editor.font="SansSerifLarge"
|
||||
left_pad="15"
|
||||
bottom_delta="0"
|
||||
name="start_location_combo"
|
||||
|
|
|
|||
Loading…
Reference in New Issue