update the window title when the domain changes or the username changes

This commit is contained in:
Don Park 2013-10-25 11:05:50 -07:00
parent dc420beaf2
commit 248f59325c

View file

@ -194,7 +194,7 @@ Application::Application(int& argc, char** argv, timeval &startup_time) :
// call Menu getInstance static method to set up the menu
_window->setMenuBar(Menu::getInstance());
// Check to see if the user passed in a command line option for loading a local
// Voxel File.
_voxelsFilename = getCmdOption(argc, constArgv, "-i");
@ -534,6 +534,7 @@ void Application::resetProfile(const QString& username) {
// call the destructor on the old profile and construct a new one
(&_profile)->~Profile();
new (&_profile) Profile(username);
updateWindowTitle();
}
void Application::controlledBroadcastToNodes(unsigned char* broadcastData, size_t dataBytes,
@ -3805,12 +3806,11 @@ void Application::updateWindowTitle(){
}
void Application::domainChanged(QString domain) {
qDebug("Application title set to: %s.\n", domain.toStdString().c_str());
_window->setWindowTitle(domain);
// update the user's last domain in their Profile (which will propagate to data-server)
_profile.updateDomain(domain);
updateWindowTitle();
// reset the environment so that we don't erroneously end up with multiple
_environment.resetToDefault();
}