Skip to content
Snippets Groups Projects
Commit c0ed4b6f authored by andreykproductengine's avatar andreykproductengine
Browse files

SL-11913 Favorites not resetting properly

parent 91c311dd
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
#include "llcommandhandler.h" // for secondlife:///app/login/ #include "llcommandhandler.h" // for secondlife:///app/login/
#include "llcombobox.h" #include "llcombobox.h"
#include "llviewercontrol.h" #include "llviewercontrol.h"
#include "llfloaterpreference.h"
#include "llfocusmgr.h" #include "llfocusmgr.h"
#include "lllineeditor.h" #include "lllineeditor.h"
#include "llnotificationsutil.h" #include "llnotificationsutil.h"
...@@ -456,6 +455,10 @@ void LLPanelLogin::addFavoritesToStartLocation() ...@@ -456,6 +455,10 @@ void LLPanelLogin::addFavoritesToStartLocation()
} }
break; break;
} }
if (combo->getValue().asString().empty())
{
combo->selectFirstItem();
}
} }
LLPanelLogin::~LLPanelLogin() LLPanelLogin::~LLPanelLogin()
...@@ -1275,13 +1278,13 @@ void LLPanelLogin::onSelectServer() ...@@ -1275,13 +1278,13 @@ void LLPanelLogin::onSelectServer()
{ {
std::string location = location_combo->getValue().asString(); std::string location = location_combo->getValue().asString();
LLSLURL slurl(location); // generata a slurl from the location combo contents LLSLURL slurl(location); // generata a slurl from the location combo contents
if ( slurl.getType() == LLSLURL::LOCATION if (location.empty()
&& slurl.getGrid() != LLGridManager::getInstance()->getGrid() || (slurl.getType() == LLSLURL::LOCATION
) && slurl.getGrid() != LLGridManager::getInstance()->getGrid())
)
{ {
// the grid specified by the location is not this one, so clear the combo // the grid specified by the location is not this one, so clear the combo
location_combo->setCurrentByIndex(0); // last location on the new grid location_combo->setCurrentByIndex(0); // last location on the new grid
location_combo->setTextEntry(LLStringUtil::null);
} }
} }
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment