mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-21 09:49:17 +02:00
sending user to previous location on second launch
This commit is contained in:
parent
828672343a
commit
50d57e8b60
1 changed files with 12 additions and 22 deletions
|
@ -2460,6 +2460,10 @@ void Application::updateHeartbeat() const {
|
||||||
void Application::onAboutToQuit() {
|
void Application::onAboutToQuit() {
|
||||||
emit beforeAboutToQuit();
|
emit beforeAboutToQuit();
|
||||||
|
|
||||||
|
if (getLoginDialogPoppedUp() && _firstRun.get()) {
|
||||||
|
_firstRun.set(false);
|
||||||
|
}
|
||||||
|
|
||||||
foreach(auto inputPlugin, PluginManager::getInstance()->getInputPlugins()) {
|
foreach(auto inputPlugin, PluginManager::getInstance()->getInputPlugins()) {
|
||||||
if (inputPlugin->isActive()) {
|
if (inputPlugin->isActive()) {
|
||||||
inputPlugin->deactivate();
|
inputPlugin->deactivate();
|
||||||
|
@ -5261,25 +5265,12 @@ void Application::resumeAfterLoginDialogActionTaken() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_firstRun.get()) {
|
|
||||||
// not first run anymore since action was taken.
|
|
||||||
_firstRun.set(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
auto accountManager = DependencyManager::get<AccountManager>();
|
auto accountManager = DependencyManager::get<AccountManager>();
|
||||||
auto addressManager = DependencyManager::get<AddressManager>();
|
auto addressManager = DependencyManager::get<AddressManager>();
|
||||||
|
|
||||||
// restart domain handler.
|
// restart domain handler.
|
||||||
nodeList->getDomainHandler().resetting();
|
nodeList->getDomainHandler().resetting();
|
||||||
|
|
||||||
if (!accountManager->isLoggedIn()) {
|
|
||||||
if (arguments().contains("--url")) {
|
|
||||||
auto reply = SandboxUtils::getStatus();
|
|
||||||
connect(reply, &QNetworkReply::finished, this, [this, reply] { handleSandboxStatus(reply); });
|
|
||||||
} else {
|
|
||||||
addressManager->goToEntry();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
QVariant testProperty = property(hifi::properties::TEST);
|
QVariant testProperty = property(hifi::properties::TEST);
|
||||||
if (testProperty.isValid()) {
|
if (testProperty.isValid()) {
|
||||||
const auto testScript = property(hifi::properties::TEST).toUrl();
|
const auto testScript = property(hifi::properties::TEST).toUrl();
|
||||||
|
@ -5294,7 +5285,6 @@ void Application::resumeAfterLoginDialogActionTaken() {
|
||||||
auto reply = SandboxUtils::getStatus();
|
auto reply = SandboxUtils::getStatus();
|
||||||
connect(reply, &QNetworkReply::finished, this, [this, reply] { handleSandboxStatus(reply); });
|
connect(reply, &QNetworkReply::finished, this, [this, reply] { handleSandboxStatus(reply); });
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
auto menu = Menu::getInstance();
|
auto menu = Menu::getInstance();
|
||||||
menu->getMenu("Edit")->setVisible(true);
|
menu->getMenu("Edit")->setVisible(true);
|
||||||
|
|
Loading…
Reference in a new issue