From 9b3810814e17426ca34786db09b34d43f5190581 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Fri, 10 Mar 2017 18:40:18 +0000 Subject: [PATCH] fiexed putting menu items on the hud when tablet not open when on desktop screen --- interface/src/Application.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 66d138103d..b575cb07b1 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -5793,12 +5793,12 @@ void Application::toggleRunningScriptsWidget() const { auto tabletScriptingInterface = DependencyManager::get(); auto tablet = dynamic_cast(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system")); + auto hmd = DependencyManager::get(); if (tablet->getToolbarMode()) { static const QUrl url("hifi/dialogs/RunningScripts.qml"); DependencyManager::get()->show(url, "RunningScripts"); } else { - QQuickItem* tabletRoot = tablet->getTabletRoot(); - if (!tabletRoot && !isHMDMode()) { + if (!hmd->getShouldShowTablet() && !isHMDMode()) { static const QUrl url("hifi/dialogs/RunningScripts.qml"); DependencyManager::get()->show(url, "RunningScripts"); } else { @@ -5835,12 +5835,11 @@ void Application::showAssetServerWidget(QString filePath) { }; auto tabletScriptingInterface = DependencyManager::get(); auto tablet = dynamic_cast(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system")); - + auto hmd = DependencyManager::get(); if (tablet->getToolbarMode()) { DependencyManager::get()->show(url, "AssetServer", startUpload); } else { - QQuickItem* tabletRoot = tablet->getTabletRoot(); - if (!tabletRoot && !isHMDMode()) { + if (!hmd->getShouldShowTablet() && !isHMDMode()) { DependencyManager::get()->show(url, "AssetServer", startUpload); } else { static const QUrl url("../../hifi/dialogs/TabletAssetServer.qml"); @@ -5873,7 +5872,8 @@ void Application::addAssetToWorldFromURL(QString url) { void Application::showDialog(const QString& desktopURL, const QString& tabletURL, const QString& name) const { auto tabletScriptingInterface = DependencyManager::get(); auto tablet = dynamic_cast(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system")); - if (tablet->getToolbarMode() || (!tablet->getTabletRoot() && !isHMDMode())) { + auto hmd = DependencyManager::get(); + if (tablet->getToolbarMode() || (!hmd->getShouldShowTablet() && !isHMDMode())) { DependencyManager::get()->show(desktopURL, name); } else { tablet->loadQMLSource(tabletURL);