Merge branch 'tablet-popup' into tablet-help

This commit is contained in:
Dante Ruiz 2017-03-23 17:35:45 +01:00
commit e708c6478e
3 changed files with 6 additions and 3 deletions
interface
resources/qml/hifi/tablet
src
libraries/script-engine/src

View file

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

View file

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

View file

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