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 | 101 | void DesktopScriptingInterface::show(const QString& path, const QString& title) { |
| 102 | + auto offscreenUI = DependencyManager::get<OffscreenUi>(); | |
| 103 | + if (!offscreenUI) { | |
| 104 | + return; | |
| 105 | + } | |
| 106 | + | |
| 102 | 107 | if (QThread::currentThread() != thread()) { |
| 103 | 108 | QMetaObject::invokeMethod(this, "show", Qt::QueuedConnection, Q_ARG(QString, path), Q_ARG(QString, title)); |
| 104 | 109 | return; |
| 105 | 110 | } |
| 106 | − DependencyManager::get<OffscreenUi>()->show(path, title); | |
| 111 | + offscreenUI->show(path, title); | |
| 107 | 112 | } |
| 108 | 113 | |
| 109 | 114 | InteractiveWindowPointer DesktopScriptingInterface::createWindow(const QString& sourceUrl, const QVariantMap& properties) { |