mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 07:12:40 +02:00
fix 4x 'fromQml' slots execution
note: per discussion with Austion & Seth, TabletRoot should be the only entity sending 'sendToScript' signals to C++
This commit is contained in:
parent
040710807d
commit
beb595266d
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