Make it work better with the tablet

This commit is contained in:
Zach Fox 2018-11-01 13:08:00 -07:00
parent 162a08b993
commit d6477993a1

View file

@ -268,9 +268,13 @@ Menu::Menu() {
// Settings > Security... // Settings > Security...
action = addActionToQMenuAndActionHash(settingsMenu, "Security..."); action = addActionToQMenuAndActionHash(settingsMenu, "Security...");
connect(action, &QAction::triggered, [] { connect(action, &QAction::triggered, [] {
auto tablet = dynamic_cast<TabletProxy*>( auto tablet = DependencyManager::get<TabletScriptingInterface>()->getTablet("com.highfidelity.interface.tablet.system");
DependencyManager::get<TabletScriptingInterface>()->getTablet("com.highfidelity.interface.tablet.system")); auto hmd = DependencyManager::get<HMDScriptingInterface>();
tablet->loadQMLSource(QString("hifi/dialogs/security/Security.qml")); tablet->pushOntoStack("hifi/dialogs/security/Security.qml");
if (!hmd->getShouldShowTablet()) {
hmd->toggleShouldShowTablet();
}
}); });
// Settings > Developer Menu // Settings > Developer Menu