Merge branch 'tablet-ui' of github.com:highfidelity/hifi into tablet-ui

This commit is contained in:
Seth Alves 2017-03-23 09:50:45 -07:00
commit 1c62a80bc2
3 changed files with 6 additions and 3 deletions

View file

@ -8,7 +8,6 @@ Item {
objectName: "tabletRoot" objectName: "tabletRoot"
property string username: "Unknown user" property string username: "Unknown user"
property var eventBridge; property var eventBridge;
property var rootMenu; property var rootMenu;
property var openModal: null; property var openModal: null;
property var openMessage: null; property var openMessage: null;

View file

@ -5848,10 +5848,14 @@ void Application::showDialog(const QString& desktopURL, const QString& tabletURL
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>(); auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system")); auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
auto hmd = DependencyManager::get<HMDScriptingInterface>(); auto hmd = DependencyManager::get<HMDScriptingInterface>();
if (tablet->getToolbarMode() || (!hmd->getShouldShowTablet() && !isHMDMode())) { if (tablet->getToolbarMode()) {
DependencyManager::get<OffscreenUi>()->show(desktopURL, name); DependencyManager::get<OffscreenUi>()->show(desktopURL, name);
} else { } else {
tablet->pushOntoStack(tabletURL); tablet->pushOntoStack(tabletURL);
if (!hmd->getShouldShowTablet() && !isHMDMode()) {
hmd->openTablet();
}
} }
} }

View file

@ -358,7 +358,7 @@ void TabletProxy::pushOntoStack(const QVariant& path) {
if (stack) { if (stack) {
QMetaObject::invokeMethod(stack, "pushSource", Q_ARG(const QVariant&, path)); QMetaObject::invokeMethod(stack, "pushSource", Q_ARG(const QVariant&, path));
} else { } else {
qCDebug(scriptengine) << "tablet cannot push QML because _qmlTabletRoot doesn't have child stack"; loadQMLSource(path);
} }
} else if (_desktopWindow) { } else if (_desktopWindow) {
auto stack = _desktopWindow->asQuickItem()->findChild<QQuickItem*>("stack"); auto stack = _desktopWindow->asQuickItem()->findChild<QQuickItem*>("stack");