Commit 67f180ed authored by Richard Gustavsen's avatar Richard Gustavsen

QQuick3DNode: ensure we only register a global transform node once

parent 25481f26
Pipeline #4988 passed with stage
in 5 minutes and 32 seconds
...@@ -433,18 +433,20 @@ void QQuick3DNode::updateGlobalTransformRegistration() ...@@ -433,18 +433,20 @@ void QQuick3DNode::updateGlobalTransformRegistration()
void QQuick3DNode::connectNotify(const QMetaMethod &signal) void QQuick3DNode::connectNotify(const QMetaMethod &signal)
{ {
if (isGlobalTransformRelatedSignal(signal)) if (isGlobalTransformRelatedSignal(signal)) {
m_globalTransformConnectionCount++; m_globalTransformConnectionCount++;
if (m_globalTransformConnectionCount == 1) if (m_globalTransformConnectionCount == 1)
updateGlobalTransformRegistration(); updateGlobalTransformRegistration();
}
} }
void QQuick3DNode::disconnectNotify(const QMetaMethod &signal) void QQuick3DNode::disconnectNotify(const QMetaMethod &signal)
{ {
if (isGlobalTransformRelatedSignal(signal)) if (isGlobalTransformRelatedSignal(signal)) {
m_globalTransformConnectionCount--; m_globalTransformConnectionCount--;
if (m_globalTransformConnectionCount == 0) if (m_globalTransformConnectionCount == 0)
updateGlobalTransformRegistration(); updateGlobalTransformRegistration();
}
} }
void QQuick3DNode::componentComplete() void QQuick3DNode::componentComplete()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment