diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2019-03-12 12:09:43 +0100 |
---|---|---|
committer | Thomas Hartmann <thomas.hartmann@qt.io> | 2019-03-12 13:14:06 +0000 |
commit | fc5cf08ed8c8da8f1f7c3ee497ee4dc68673bcd0 (patch) | |
tree | 8aec457b7c6ab0a91a7b098e390131b84ae0d7d1 | |
parent | 37eb282313783e2b9834fedf12ad14d23581b067 (diff) | |
download | qt-creator-fc5cf08ed8c8da8f1f7c3ee497ee4dc68673bcd0.tar.gz |
Fix regression in timeline
Empty keyframe groups were created randomly.
Change-Id: I223ac7fe5f0112bafebbab26f05f9a45d59849eb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r-- | src/plugins/qmldesigner/designercore/include/qmltimeline.h | 2 | ||||
-rw-r--r-- | src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/qmldesigner/designercore/include/qmltimeline.h b/src/plugins/qmldesigner/designercore/include/qmltimeline.h index a92a292119..c04fd454c0 100644 --- a/src/plugins/qmldesigner/designercore/include/qmltimeline.h +++ b/src/plugins/qmldesigner/designercore/include/qmltimeline.h @@ -71,10 +71,10 @@ public: void toogleRecording(bool b) const; void resetGroupRecording() const; + bool hasKeyframeGroup(const ModelNode &node, const PropertyName &propertyName) const; private: void addKeyframeGroupIfNotExists(const ModelNode &node, const PropertyName &propertyName); - bool hasKeyframeGroup(const ModelNode &node, const PropertyName &propertyName) const; QList<QmlTimelineKeyframeGroup> allKeyframeGroups() const; }; diff --git a/src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp b/src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp index 745fdc4d00..65ed482bfb 100644 --- a/src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp +++ b/src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp @@ -63,7 +63,7 @@ void QmlObjectNode::setVariantProperty(const PropertyName &name, const QVariant timelineFrames.setValue(value, frame); return; - } else if (modelNode().hasId() && timelineIsActive()) { + } else if (modelNode().hasId() && timelineIsActive() && currentTimeline().hasKeyframeGroup(modelNode(), name)) { QmlTimelineKeyframeGroup timelineFrames(currentTimeline().keyframeGroup(modelNode(), name)); Q_ASSERT(timelineFrames.isValid()); |