mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 16:13:28 +02:00
commit
a025fab5c8
2 changed files with 14 additions and 18 deletions
|
@ -1362,6 +1362,9 @@ void Application::paintGL() {
|
|||
renderArgs._renderMode = RenderArgs::MIRROR_RENDER_MODE;
|
||||
renderArgs._blitFramebuffer = DependencyManager::get<FramebufferCache>()->getSelfieFramebuffer();
|
||||
|
||||
auto inputs = AvatarInputs::getInstance();
|
||||
_mirrorViewRect.moveTo(inputs->x(), inputs->y());
|
||||
|
||||
renderRearViewMirror(&renderArgs, _mirrorViewRect);
|
||||
|
||||
renderArgs._blitFramebuffer.reset();
|
||||
|
|
|
@ -220,18 +220,7 @@ QmlWindowClass::QmlWindowClass(QObject* qmlWindow)
|
|||
}
|
||||
|
||||
QmlWindowClass::~QmlWindowClass() {
|
||||
if (_qmlWindow) {
|
||||
if (_toolWindow) {
|
||||
auto offscreenUi = DependencyManager::get<OffscreenUi>();
|
||||
auto toolWindow = offscreenUi->getToolWindow();
|
||||
auto invokeResult = QMetaObject::invokeMethod(toolWindow, "removeTabForUrl", Qt::QueuedConnection,
|
||||
Q_ARG(QVariant, _source));
|
||||
Q_ASSERT(invokeResult);
|
||||
} else {
|
||||
_qmlWindow->deleteLater();
|
||||
}
|
||||
_qmlWindow = nullptr;
|
||||
}
|
||||
close();
|
||||
}
|
||||
|
||||
void QmlWindowClass::registerObject(const QString& name, QObject* object) {
|
||||
|
@ -331,14 +320,18 @@ void QmlWindowClass::setTitle(const QString& title) {
|
|||
}
|
||||
|
||||
void QmlWindowClass::close() {
|
||||
DependencyManager::get<OffscreenUi>()->executeOnUiThread([this] {
|
||||
if (_qmlWindow) {
|
||||
_qmlWindow->setProperty("destroyOnInvisible", true);
|
||||
_qmlWindow->setProperty("visible", false);
|
||||
if (_qmlWindow) {
|
||||
if (_toolWindow) {
|
||||
auto offscreenUi = DependencyManager::get<OffscreenUi>();
|
||||
auto toolWindow = offscreenUi->getToolWindow();
|
||||
auto invokeResult = QMetaObject::invokeMethod(toolWindow, "removeTabForUrl", Qt::QueuedConnection,
|
||||
Q_ARG(QVariant, _source));
|
||||
Q_ASSERT(invokeResult);
|
||||
} else {
|
||||
_qmlWindow->deleteLater();
|
||||
_qmlWindow = nullptr;
|
||||
}
|
||||
});
|
||||
_qmlWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void QmlWindowClass::hasClosed() {
|
||||
|
|
Loading…
Reference in a new issue