mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 02:14:26 +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();
|
||||
|
||||
onItemCreated(qmlContext, newItem);
|
||||
connect(newItem, SIGNAL(sendToScript(QVariant)), this, SIGNAL(fromQml(QVariant)));
|
||||
|
||||
if (!rootCreated) {
|
||||
connect(newItem, SIGNAL(sendToScript(QVariant)), this, SIGNAL(fromQml(QVariant)));
|
||||
onRootCreated();
|
||||
emit rootItemCreated(newItem);
|
||||
// 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));
|
||||
}
|
||||
|
||||
connect(newItem, SIGNAL(sendToScript(QVariant)), this, SIGNAL(fromQml(QVariant)));
|
||||
}
|
||||
|
||||
void OffscreenQmlSurface::onRootCreated() {
|
||||
|
|
Loading…
Reference in a new issue