From 508f4ead593b5d950edb3707e530cdef4603a8b5 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 29 Sep 2020 19:37:19 +0300 Subject: SL-13990 'My last location' sometimes is not applied --- indra/newview/llpanellogin.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llpanellogin.cpp') diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index da21d5e69a..2d501b5783 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -458,6 +458,9 @@ void LLPanelLogin::addFavoritesToStartLocation() if (combo->getValue().asString().empty()) { combo->selectFirstItem(); + // Value 'home' or 'last' should have been taken from NextLoginLocation + // but NextLoginLocation was not set, so init it from combo explicitly + onLocationSLURL(); } } @@ -1340,6 +1343,7 @@ void LLPanelLogin::onSelectServer() { // the grid specified by the location is not this one, so clear the combo location_combo->setCurrentByIndex(0); // last location on the new grid + onLocationSLURL(); } } break; -- cgit v1.2.3 From 0ad34bfb26aa1c14ab854dc6a86f8c0ea5f8ae51 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 9 Apr 2021 19:23:34 +0300 Subject: =?UTF-8?q?SL-15094=20FIXED=20=E2=80=98My=20last=20location?= =?UTF-8?q?=E2=80=99=20is=20used=20instead=20of=20entered=20location?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- indra/newview/llpanellogin.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'indra/newview/llpanellogin.cpp') diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 0e7634f1d2..d7462f50e2 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -254,7 +254,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLLineEditor* password_edit(getChild("password_edit")); password_edit->setKeystrokeCallback(onPassKey, this); // STEAM-14: When user presses Enter with this field in focus, initiate login - password_edit->setCommitCallback(boost::bind(&LLPanelLogin::onClickConnect, this)); + password_edit->setCommitCallback(boost::bind(&LLPanelLogin::onClickConnect, false)); // change z sort of clickable text to be behind buttons sendChildToBack(getChildView("forgot_password_text")); @@ -265,7 +265,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, { LLComboBox* favorites_combo = getChild("start_location_combo"); updateLocationSelectorsVisibility(); // separate so that it can be called from preferences - favorites_combo->setReturnCallback(boost::bind(&LLPanelLogin::onClickConnect, this)); + favorites_combo->setReturnCallback(boost::bind(&LLPanelLogin::onClickConnect, false)); favorites_combo->setFocusLostCallback(boost::bind(&LLPanelLogin::onLocationSLURL, this)); LLComboBox* server_choice_combo = getChild("server_combo"); @@ -997,12 +997,15 @@ void LLPanelLogin::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent ev // Protected methods //--------------------------------------------------------------------------- // static -void LLPanelLogin::onClickConnect(void *) +void LLPanelLogin::onClickConnect(bool commit_fields) { if (sInstance && sInstance->mCallback) { - // JC - Make sure the fields all get committed. - sInstance->setFocus(FALSE); + if (commit_fields) + { + // JC - Make sure the fields all get committed. + sInstance->setFocus(FALSE); + } LLComboBox* combo = sInstance->getChild("server_combo"); LLSD combo_val = combo->getSelectedValue(); @@ -1125,7 +1128,7 @@ void LLPanelLogin::onUserListCommit(void*) } else { - onClickConnect(NULL); + onClickConnect(); } } } -- cgit v1.2.3