diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 3fef5bd8d8..75a9f598f7 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3537,7 +3537,17 @@ void Application::handleSandboxStatus(QNetworkReply* reply) { } else { #if !defined(Q_OS_ANDROID) - qCDebug(interfaceapp) << "Not first run... going to" << qPrintable(addressLookupString.isEmpty() ? QString("previous location") : addressLookupString); + QString goingTo = ""; + if (addressLookupString.isEmpty()) { + if (Menu::getInstance()->isOptionChecked(MenuOption::HomeLocation)) { + auto locationBookmarks = DependencyManager::get(); + addressLookupString = locationBookmarks->addressForBookmark(LocationBookmarks::HOME_BOOKMARK); + goingTo = "home location"; + } else { + goingTo = "previous location"; + } + } + qCDebug(interfaceapp) << "Not first run... going to" << qPrintable(!goingTo.isEmpty() ? goingTo : addressLookupString); DependencyManager::get()->loadSettings(addressLookupString); sentTo = SENT_TO_PREVIOUS_LOCATION; #endif diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 1fc1e0c033..9d2d266b5c 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -226,6 +226,14 @@ Menu::Menu() { addActionToQMenuAndActionHash(navigateMenu, MenuOption::CopyPath, 0, addressManager.data(), SLOT(copyPath())); + // Navigate > Start-up Location + MenuWrapper* startupLocationMenu = navigateMenu->addMenu(MenuOption::StartUpLocation); + QActionGroup* startupLocatiopnGroup = new QActionGroup(startupLocationMenu); + startupLocatiopnGroup->setExclusive(true); + startupLocatiopnGroup->addAction(addCheckableActionToQMenuAndActionHash(startupLocationMenu, MenuOption::HomeLocation, 0, + false)); + startupLocatiopnGroup->addAction(addCheckableActionToQMenuAndActionHash(startupLocationMenu, MenuOption::LastLocation, 0, + true)); // Settings menu ---------------------------------- MenuWrapper* settingsMenu = addMenu("Settings"); diff --git a/interface/src/Menu.h b/interface/src/Menu.h index f1d56825b5..d26879c816 100644 --- a/interface/src/Menu.h +++ b/interface/src/Menu.h @@ -117,9 +117,11 @@ namespace MenuOption { const QString FrameTimer = "Show Timer"; const QString FullscreenMirror = "Mirror"; const QString Help = "Help..."; + const QString HomeLocation = "Home"; const QString IncreaseAvatarSize = "Increase Avatar Size"; const QString IndependentMode = "Independent Mode"; const QString ActionMotorControl = "Enable Default Motor Control"; + const QString LastLocation = "Last Location"; const QString LoadScript = "Open and Run Script File..."; const QString LoadScriptURL = "Open and Run Script from URL..."; const QString LodTools = "LOD Tools"; @@ -197,6 +199,7 @@ namespace MenuOption { const QString SimulateEyeTracking = "Simulate"; const QString SMIEyeTracking = "SMI Eye Tracking"; const QString SparseTextureManagement = "Enable Sparse Texture Management"; + const QString StartUpLocation = "Start-Up Location"; const QString Stats = "Show Statistics"; const QString AnimStats = "Show Animation Stats"; const QString StopAllScripts = "Stop All Scripts";