diff options
Diffstat (limited to 'src/animation/frontend/qchannelmapping.cpp')
-rw-r--r-- | src/animation/frontend/qchannelmapping.cpp | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/src/animation/frontend/qchannelmapping.cpp b/src/animation/frontend/qchannelmapping.cpp index 8f6ebe9ab..fa89d5042 100644 --- a/src/animation/frontend/qchannelmapping.cpp +++ b/src/animation/frontend/qchannelmapping.cpp @@ -147,37 +147,20 @@ void QChannelMappingPrivate::updatePropertyNameTypeAndComponentCount() if (m_type != type) { m_type = type; - - // Send update to the backend - Q_Q(QChannelMapping); - auto e = Qt3DCore::QPropertyUpdatedChangePtr::create(q->id()); - e->setPropertyName("type"); - e->setValue(QVariant(m_type)); - notifyObservers(e); + update(); } if (m_componentCount != componentCount) { m_componentCount = componentCount; - - // Send update to the backend - Q_Q(QChannelMapping); - auto e = Qt3DCore::QPropertyUpdatedChangePtr::create(q->id()); - e->setPropertyName("componentCount"); - e->setValue(QVariant(m_componentCount)); - notifyObservers(e); + update(); } if (qstrcmp(m_propertyName, propertyName) != 0) { m_propertyName = propertyName; - - // Send update to the backend - Q_Q(QChannelMapping); - auto e = Qt3DCore::QPropertyUpdatedChangePtr::create(q->id()); - e->setPropertyName("propertyName"); - e->setValue(QVariant::fromValue(const_cast<void *>(static_cast<const void *>(m_propertyName)))); - notifyObservers(e); + update(); } } + /*! \class QChannelMapping \inherits Qt3DCore::QNode |