mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Use loadQMlSource if no stack is aviable
This commit is contained in:
parent
93341556ff
commit
af97c7275e
3 changed files with 6 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -5848,10 +5848,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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue