diff options
author | Mark Palange (Mani) <palange@lindenlab.com> | 2009-11-25 14:38:17 -0800 |
---|---|---|
committer | Mark Palange (Mani) <palange@lindenlab.com> | 2009-11-25 14:38:17 -0800 |
commit | 61dfff44d4cead9d17a78b16ad7371b76df7654a (patch) | |
tree | 75a3eef8212ea7f4026160983d14a2be84d67ee2 /indra/newview/llpanellogin.cpp | |
parent | 5b5354c933aa7b1ceeb307853c24fba28d4e31bf (diff) |
Change to ensure the start location combo box is being read and stored properly.
Diffstat (limited to 'indra/newview/llpanellogin.cpp')
-rw-r--r-- | indra/newview/llpanellogin.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index ec0f8e303c..97f01d2c74 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -225,6 +225,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLComboBox* combo = getChild<LLComboBox>("start_location_combo"); + LLURLSimString::setString(gSavedSettings.getString("LoginLocation")); std::string sim_string = LLURLSimString::sInstance.mSimString; if (!sim_string.empty()) { @@ -892,12 +893,27 @@ void LLPanelLogin::onClickConnect(void *) LLComboBox* combo = sInstance->getChild<LLComboBox>("start_location_combo"); std::string combo_text = combo->getSimple(); - if (first.empty() || last.empty()) + bool has_first_and_last = !(first.empty() || last.empty()); + bool has_location = false; + + if(combo_text=="<Type region name>" || combo_text =="") + { + // *NOTE: Mani - Location field is not always committed by this point! + // This may be duplicate work, but better than not doing the work! + LLURLSimString::sInstance.setString(""); + } + else + { + // *NOTE: Mani - Location field is not always committed by this point! + LLURLSimString::sInstance.setString(combo_text); + has_location = true; + } + + if(!has_first_and_last) { LLNotifications::instance().add("MustHaveAccountToLogIn"); } - else if( (combo_text=="<Type region name>" || combo_text =="") - && LLURLSimString::sInstance.mSimString =="") + else if(!has_location) { LLNotifications::instance().add("StartRegionEmpty"); } |