mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 22:22:54 +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._renderMode = RenderArgs::MIRROR_RENDER_MODE;
|
||||||
renderArgs._blitFramebuffer = DependencyManager::get<FramebufferCache>()->getSelfieFramebuffer();
|
renderArgs._blitFramebuffer = DependencyManager::get<FramebufferCache>()->getSelfieFramebuffer();
|
||||||
|
|
||||||
|
auto inputs = AvatarInputs::getInstance();
|
||||||
|
_mirrorViewRect.moveTo(inputs->x(), inputs->y());
|
||||||
|
|
||||||
renderRearViewMirror(&renderArgs, _mirrorViewRect);
|
renderRearViewMirror(&renderArgs, _mirrorViewRect);
|
||||||
|
|
||||||
renderArgs._blitFramebuffer.reset();
|
renderArgs._blitFramebuffer.reset();
|
||||||
|
|
|
@ -220,18 +220,7 @@ QmlWindowClass::QmlWindowClass(QObject* qmlWindow)
|
||||||
}
|
}
|
||||||
|
|
||||||
QmlWindowClass::~QmlWindowClass() {
|
QmlWindowClass::~QmlWindowClass() {
|
||||||
if (_qmlWindow) {
|
close();
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlWindowClass::registerObject(const QString& name, QObject* object) {
|
void QmlWindowClass::registerObject(const QString& name, QObject* object) {
|
||||||
|
@ -331,14 +320,18 @@ void QmlWindowClass::setTitle(const QString& title) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlWindowClass::close() {
|
void QmlWindowClass::close() {
|
||||||
DependencyManager::get<OffscreenUi>()->executeOnUiThread([this] {
|
|
||||||
if (_qmlWindow) {
|
if (_qmlWindow) {
|
||||||
_qmlWindow->setProperty("destroyOnInvisible", true);
|
if (_toolWindow) {
|
||||||
_qmlWindow->setProperty("visible", false);
|
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->deleteLater();
|
||||||
|
}
|
||||||
_qmlWindow = nullptr;
|
_qmlWindow = nullptr;
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlWindowClass::hasClosed() {
|
void QmlWindowClass::hasClosed() {
|
||||||
|
|
Loading…
Reference in a new issue