diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index 09e2cee..d7eff5d 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp @@ -710,6 +710,13 @@ void LLPanelLogin::addServer(const std::string& server, S32 domain_name) combo->add(server, LLSD(domain_name) ); combo->setCurrentByIndex(0); } +// +// static +void LLPanelLogin::setServer(S32 domain_name) +{ + LLComboBox* combo = sInstance->getChild("server_combo"); + combo->setCurrentByIndex(domain_name); +} // static void LLPanelLogin::getFields(std::string &firstname, std::string &lastname, std::string &password, diff --git a/linden/indra/newview/llpanellogin.h b/linden/indra/newview/llpanellogin.h index 539997b..78b0a22 100644 --- a/linden/indra/newview/llpanellogin.h +++ b/linden/indra/newview/llpanellogin.h @@ -87,6 +87,7 @@ public: const std::string& password, BOOL remember); static void addServer(const std::string& server, S32 domain_name); + static void setServer(S32 domain_name); static void refreshLocation( bool force_visible ); static void getFields(std::string& firstname, std::string& lastname, diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 625b1d8..6371f2b 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -2458,14 +2458,14 @@ void login_show() // UI textures have been previously loaded in doPreloadImages() LL_DEBUGS("AppInit") << "Setting Servers" << LL_ENDL; - - LLPanelLogin::addServer(LLViewerLogin::getInstance()->getGridLabel(), LLViewerLogin::getInstance()->getGridChoice()); + LL_INFOS("AppInit") << "getGridChoice is " << LLViewerLogin::getInstance()->getGridChoice() << LL_ENDL; LLViewerLogin* vl = LLViewerLogin::getInstance(); for(int grid_index = GRID_INFO_NONE + 1; grid_index < GRID_INFO_OTHER; ++grid_index) { LLPanelLogin::addServer(vl->getKnownGridLabel((EGridInfo)grid_index), grid_index); } + LLPanelLogin::setServer(LLViewerLogin::getInstance()->getGridChoice()-1); } // Callback for when login screen is closed. Option 0 = connect, option 1 = quit. diff --git a/linden/indra/newview/llviewernetwork.cpp b/linden/indra/newview/llviewernetwork.cpp index c8cffcf..e41db3d 100644 --- a/linden/indra/newview/llviewernetwork.cpp +++ b/linden/indra/newview/llviewernetwork.cpp @@ -163,7 +163,7 @@ std::string LLViewerLogin::getGridLabel() const std::string LLViewerLogin::getGridCodeName() const { - if( gGridInfo[mGridChoice].mCodeName == "" ) + if(! strcmp(gGridInfo[mGridChoice].mCodeName, "" )) { return getGridLabel(); }