mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 20:26:55 +02:00
Merge pull request #12396 from ElderOrb/double-connection-fix
fix 4x 'fromQml' slots execution
This commit is contained in:
commit
92249a2bee
2 changed files with 1 additions and 2 deletions
|
@ -331,9 +331,9 @@ void OffscreenSurface::finishQmlLoad(QQmlComponent* qmlComponent,
|
||||||
qmlComponent->deleteLater();
|
qmlComponent->deleteLater();
|
||||||
|
|
||||||
onItemCreated(qmlContext, newItem);
|
onItemCreated(qmlContext, newItem);
|
||||||
connect(newItem, SIGNAL(sendToScript(QVariant)), this, SIGNAL(fromQml(QVariant)));
|
|
||||||
|
|
||||||
if (!rootCreated) {
|
if (!rootCreated) {
|
||||||
|
connect(newItem, SIGNAL(sendToScript(QVariant)), this, SIGNAL(fromQml(QVariant)));
|
||||||
onRootCreated();
|
onRootCreated();
|
||||||
emit rootItemCreated(newItem);
|
emit rootItemCreated(newItem);
|
||||||
// Call this callback after rootitem is set, otherwise VrMenu wont work
|
// Call this callback after rootitem is set, otherwise VrMenu wont work
|
||||||
|
|
|
@ -305,7 +305,6 @@ void OffscreenQmlSurface::onItemCreated(QQmlContext* qmlContext, QQuickItem* new
|
||||||
qmlContext->setContextProperty("eventBridgeWrapper", new EventBridgeWrapper(eventBridge, qmlContext));
|
qmlContext->setContextProperty("eventBridgeWrapper", new EventBridgeWrapper(eventBridge, qmlContext));
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(newItem, SIGNAL(sendToScript(QVariant)), this, SIGNAL(fromQml(QVariant)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffscreenQmlSurface::onRootCreated() {
|
void OffscreenQmlSurface::onRootCreated() {
|
||||||
|
|
Loading…
Reference in a new issue