mirror of
https://github.com/overte-org/overte.git
synced 2025-04-07 15:34:05 +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() {
|
||||
Q_ASSERT(QThread::currentThread() == qApp->thread());
|
||||
auto offscreenUi = DependencyManager::get<OffscreenUi>();
|
||||
return offscreenUi->getFlags();
|
||||
auto offscreenUI = DependencyManager::get<OffscreenUi>();
|
||||
return offscreenUI ? offscreenUI->getFlags() : nullptr;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -364,8 +364,6 @@ void TabletProxy::setToolbarMode(bool toolbarMode) {
|
|||
|
||||
_toolbarMode = toolbarMode;
|
||||
|
||||
auto offscreenUi = DependencyManager::get<OffscreenUi>();
|
||||
|
||||
if (toolbarMode) {
|
||||
#if !defined(DISABLE_QML)
|
||||
closeDialog();
|
||||
|
@ -385,18 +383,21 @@ void TabletProxy::setToolbarMode(bool toolbarMode) {
|
|||
connect(tabletRootWindow, &QmlWindowClass::fromQml, this, &TabletProxy::fromQml);
|
||||
#endif
|
||||
} else {
|
||||
#if !defined(DISABLE_QML)
|
||||
if (_currentPathLoaded != TABLET_HOME_SOURCE_URL) {
|
||||
loadHomeScreen(true);
|
||||
}
|
||||
#endif
|
||||
//check if running scripts window opened and save it for reopen in Tablet
|
||||
if (offscreenUi->isVisible("RunningScripts")) {
|
||||
offscreenUi->hide("RunningScripts");
|
||||
_showRunningScripts = true;
|
||||
|
||||
auto offscreenUI = DependencyManager::get<OffscreenUi>();
|
||||
if (offscreenUI) {
|
||||
//check if running scripts window opened and save it for reopen in Tablet
|
||||
if (offscreenUI->isVisible("RunningScripts")) {
|
||||
offscreenUI->hide("RunningScripts");
|
||||
_showRunningScripts = true;
|
||||
}
|
||||
|
||||
offscreenUI->hideDesktopWindows();
|
||||
}
|
||||
|
||||
offscreenUi->hideDesktopWindows();
|
||||
// destroy desktop window
|
||||
if (_desktopWindow) {
|
||||
_desktopWindow->deleteLater();
|
||||
|
@ -579,9 +580,9 @@ void TabletProxy::gotoMenuScreen(const QString& submenu) {
|
|||
root = _desktopWindow->asQuickItem();
|
||||
}
|
||||
|
||||
if (root) {
|
||||
auto offscreenUi = DependencyManager::get<OffscreenUi>();
|
||||
QObject* menu = offscreenUi->getRootMenu();
|
||||
auto offscreenUI = DependencyManager::get<OffscreenUi>();
|
||||
if (root && offscreenUI) {
|
||||
QObject* menu = offscreenUI->getRootMenu();
|
||||
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)));
|
||||
_state = State::Menu;
|
||||
|
|
Loading…
Reference in a new issue