mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 02:43:32 +02:00
hurr durr I'm an idiot
This commit is contained in:
parent
4bf952260f
commit
3335c040e5
1 changed files with 15 additions and 14 deletions
|
@ -321,8 +321,8 @@ void TabletScriptingInterface::processEvent(const QKeyEvent* event) {
|
||||||
|
|
||||||
QObject* TabletScriptingInterface::getFlags() {
|
QObject* TabletScriptingInterface::getFlags() {
|
||||||
Q_ASSERT(QThread::currentThread() == qApp->thread());
|
Q_ASSERT(QThread::currentThread() == qApp->thread());
|
||||||
auto offscreenUi = DependencyManager::get<OffscreenUi>();
|
auto offscreenUI = DependencyManager::get<OffscreenUi>();
|
||||||
return offscreenUi->getFlags();
|
return offscreenUI ? offscreenUI->getFlags() : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -364,8 +364,6 @@ void TabletProxy::setToolbarMode(bool toolbarMode) {
|
||||||
|
|
||||||
_toolbarMode = toolbarMode;
|
_toolbarMode = toolbarMode;
|
||||||
|
|
||||||
auto offscreenUi = DependencyManager::get<OffscreenUi>();
|
|
||||||
|
|
||||||
if (toolbarMode) {
|
if (toolbarMode) {
|
||||||
#if !defined(DISABLE_QML)
|
#if !defined(DISABLE_QML)
|
||||||
closeDialog();
|
closeDialog();
|
||||||
|
@ -385,18 +383,21 @@ void TabletProxy::setToolbarMode(bool toolbarMode) {
|
||||||
connect(tabletRootWindow, &QmlWindowClass::fromQml, this, &TabletProxy::fromQml);
|
connect(tabletRootWindow, &QmlWindowClass::fromQml, this, &TabletProxy::fromQml);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
#if !defined(DISABLE_QML)
|
|
||||||
if (_currentPathLoaded != TABLET_HOME_SOURCE_URL) {
|
if (_currentPathLoaded != TABLET_HOME_SOURCE_URL) {
|
||||||
loadHomeScreen(true);
|
loadHomeScreen(true);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
//check if running scripts window opened and save it for reopen in Tablet
|
auto offscreenUI = DependencyManager::get<OffscreenUi>();
|
||||||
if (offscreenUi->isVisible("RunningScripts")) {
|
if (offscreenUI) {
|
||||||
offscreenUi->hide("RunningScripts");
|
//check if running scripts window opened and save it for reopen in Tablet
|
||||||
_showRunningScripts = true;
|
if (offscreenUI->isVisible("RunningScripts")) {
|
||||||
|
offscreenUI->hide("RunningScripts");
|
||||||
|
_showRunningScripts = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
offscreenUI->hideDesktopWindows();
|
||||||
}
|
}
|
||||||
|
|
||||||
offscreenUi->hideDesktopWindows();
|
|
||||||
// destroy desktop window
|
// destroy desktop window
|
||||||
if (_desktopWindow) {
|
if (_desktopWindow) {
|
||||||
_desktopWindow->deleteLater();
|
_desktopWindow->deleteLater();
|
||||||
|
@ -579,9 +580,9 @@ void TabletProxy::gotoMenuScreen(const QString& submenu) {
|
||||||
root = _desktopWindow->asQuickItem();
|
root = _desktopWindow->asQuickItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (root) {
|
auto offscreenUI = DependencyManager::get<OffscreenUi>();
|
||||||
auto offscreenUi = DependencyManager::get<OffscreenUi>();
|
if (root && offscreenUI) {
|
||||||
QObject* menu = offscreenUi->getRootMenu();
|
QObject* menu = offscreenUI->getRootMenu();
|
||||||
QMetaObject::invokeMethod(root, "setMenuProperties", Q_ARG(QVariant, QVariant::fromValue(menu)), Q_ARG(const QVariant&, QVariant(submenu)));
|
QMetaObject::invokeMethod(root, "setMenuProperties", Q_ARG(QVariant, QVariant::fromValue(menu)), Q_ARG(const QVariant&, QVariant(submenu)));
|
||||||
QMetaObject::invokeMethod(root, "loadSource", Q_ARG(const QVariant&, QVariant(VRMENU_SOURCE_URL)));
|
QMetaObject::invokeMethod(root, "loadSource", Q_ARG(const QVariant&, QVariant(VRMENU_SOURCE_URL)));
|
||||||
_state = State::Menu;
|
_state = State::Menu;
|
||||||
|
|
Loading…
Reference in a new issue