mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
Add option to start up at home location
This commit is contained in:
parent
db87fe9696
commit
ae2715af31
3 changed files with 22 additions and 1 deletions
|
@ -3503,7 +3503,17 @@ void Application::handleSandboxStatus(QNetworkReply* reply) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
#if !defined(Q_OS_ANDROID)
|
#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<LocationBookmarks>();
|
||||||
|
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<AddressManager>()->loadSettings(addressLookupString);
|
DependencyManager::get<AddressManager>()->loadSettings(addressLookupString);
|
||||||
sentTo = SENT_TO_PREVIOUS_LOCATION;
|
sentTo = SENT_TO_PREVIOUS_LOCATION;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -226,6 +226,14 @@ Menu::Menu() {
|
||||||
addActionToQMenuAndActionHash(navigateMenu, MenuOption::CopyPath, 0,
|
addActionToQMenuAndActionHash(navigateMenu, MenuOption::CopyPath, 0,
|
||||||
addressManager.data(), SLOT(copyPath()));
|
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 ----------------------------------
|
// Settings menu ----------------------------------
|
||||||
MenuWrapper* settingsMenu = addMenu("Settings");
|
MenuWrapper* settingsMenu = addMenu("Settings");
|
||||||
|
|
|
@ -117,9 +117,11 @@ namespace MenuOption {
|
||||||
const QString FrameTimer = "Show Timer";
|
const QString FrameTimer = "Show Timer";
|
||||||
const QString FullscreenMirror = "Mirror";
|
const QString FullscreenMirror = "Mirror";
|
||||||
const QString Help = "Help...";
|
const QString Help = "Help...";
|
||||||
|
const QString HomeLocation = "Home";
|
||||||
const QString IncreaseAvatarSize = "Increase Avatar Size";
|
const QString IncreaseAvatarSize = "Increase Avatar Size";
|
||||||
const QString IndependentMode = "Independent Mode";
|
const QString IndependentMode = "Independent Mode";
|
||||||
const QString ActionMotorControl = "Enable Default Motor Control";
|
const QString ActionMotorControl = "Enable Default Motor Control";
|
||||||
|
const QString LastLocation = "Last Location";
|
||||||
const QString LoadScript = "Open and Run Script File...";
|
const QString LoadScript = "Open and Run Script File...";
|
||||||
const QString LoadScriptURL = "Open and Run Script from URL...";
|
const QString LoadScriptURL = "Open and Run Script from URL...";
|
||||||
const QString LodTools = "LOD Tools";
|
const QString LodTools = "LOD Tools";
|
||||||
|
@ -197,6 +199,7 @@ namespace MenuOption {
|
||||||
const QString SimulateEyeTracking = "Simulate";
|
const QString SimulateEyeTracking = "Simulate";
|
||||||
const QString SMIEyeTracking = "SMI Eye Tracking";
|
const QString SMIEyeTracking = "SMI Eye Tracking";
|
||||||
const QString SparseTextureManagement = "Enable Sparse Texture Management";
|
const QString SparseTextureManagement = "Enable Sparse Texture Management";
|
||||||
|
const QString StartUpLocation = "Start-Up Location";
|
||||||
const QString Stats = "Show Statistics";
|
const QString Stats = "Show Statistics";
|
||||||
const QString AnimStats = "Show Animation Stats";
|
const QString AnimStats = "Show Animation Stats";
|
||||||
const QString StopAllScripts = "Stop All Scripts";
|
const QString StopAllScripts = "Stop All Scripts";
|
||||||
|
|
Loading…
Reference in a new issue