Showing the changes to interface/src/scripting/DesktopScriptingInterface.cpp (1 of 17 files). Show all
Unified · Split
| @@ -99,11 +99,16 @@ void DesktopScriptingInterface::setHUDAlpha(float alpha) { · 98 unmodified lines | |||
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | void DesktopScriptingInterface::show(const QString& path, const QString& title) { | 101 | void DesktopScriptingInterface::show(const QString& path, const QString& title) { |
| 102 | auto offscreenUI = DependencyManager::get<OffscreenUi>(); | ||
| 103 | if (!offscreenUI) { | ||
| 104 | return; | ||
| 105 | } | ||
| 106 | |||
| 102 | if (QThread::currentThread() != thread()) { | 107 | if (QThread::currentThread() != thread()) { |
| 103 | QMetaObject::invokeMethod(this, "show", Qt::QueuedConnection, Q_ARG(QString, path), Q_ARG(QString, title)); | 108 | QMetaObject::invokeMethod(this, "show", Qt::QueuedConnection, Q_ARG(QString, path), Q_ARG(QString, title)); |
| 104 | return; | 109 | return; |
| 105 | } | 110 | } |
| 106 | DependencyManager::get<OffscreenUi>()->show(path, title); | 111 | offscreenUI->show(path, title); |
| 107 | } | 112 | } |
| 108 | 113 | ||
| 109 | InteractiveWindowPointer DesktopScriptingInterface::createWindow(const QString& sourceUrl, const QVariantMap& properties) { | 114 | InteractiveWindowPointer DesktopScriptingInterface::createWindow(const QString& sourceUrl, const QVariantMap& properties) { |