Make Cancel in HMD settings dialogs return to Settings dialog

This commit is contained in:
David Rowe 2018-08-28 11:15:57 +12:00
parent 7ddd70a84a
commit c29c9f98c1
2 changed files with 6 additions and 2 deletions

View file

@ -50,7 +50,11 @@ Item {
section.restoreAll(); section.restoreAll();
} }
closeDialog(); if (HMD.active) {
tablet.popFromStack();
} else {
closeDialog();
}
} }
function closeDialog() { function closeDialog() {

View file

@ -254,7 +254,7 @@ Menu::Menu() {
connect(action, &QAction::triggered, [] { connect(action, &QAction::triggered, [] {
auto tablet = DependencyManager::get<TabletScriptingInterface>()->getTablet("com.highfidelity.interface.tablet.system"); auto tablet = DependencyManager::get<TabletScriptingInterface>()->getTablet("com.highfidelity.interface.tablet.system");
auto hmd = DependencyManager::get<HMDScriptingInterface>(); auto hmd = DependencyManager::get<HMDScriptingInterface>();
tablet->loadQMLSource("hifi/tablet/ControllerSettings.qml"); tablet->pushOntoStack("hifi/tablet/ControllerSettings.qml");
if (!hmd->getShouldShowTablet()) { if (!hmd->getShouldShowTablet()) {
hmd->toggleShouldShowTablet(); hmd->toggleShouldShowTablet();