summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2019-03-28 15:06:08 +0200
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2019-03-28 13:38:26 +0000
commit2d320178824037aeecb1b2bdf3722fec97ac3239 (patch)
treea38d8bd5f5fffb4836fcd6eac9b9333cd02f9777
parent16d5c95207f163202ad9a83336f362f3f2595a8a (diff)
Fix timeline keyframe update when the entire animation is deleted
Change-Id: Id511ec52d6b69f531f1bfc1f887fe52b140b4eb0 Fixes: QT3DS-3237 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r--src/Authoring/Studio/Palettes/TimelineGraphicsView/TimelineWidget.cpp1
-rw-r--r--src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/Authoring/Studio/Palettes/TimelineGraphicsView/TimelineWidget.cpp b/src/Authoring/Studio/Palettes/TimelineGraphicsView/TimelineWidget.cpp
index c0d7a965..44471c17 100644
--- a/src/Authoring/Studio/Palettes/TimelineGraphicsView/TimelineWidget.cpp
+++ b/src/Authoring/Studio/Palettes/TimelineGraphicsView/TimelineWidget.cpp
@@ -637,6 +637,7 @@ void TimelineWidget::onAnimationDeleted(qt3dsdm::Qt3DSDMInstanceHandle parentIns
if (propBinding && !propAnimated) {
m_graphicsScene->rowManager()->deleteRow(propBinding->getRowTree());
binding->RemovePropertyRow(property);
+ m_keyframeChangesMap.insert(parentInstance, property);
// Ensure row deletions are finalized
if (!m_asyncUpdateTimer.isActive())
m_asyncUpdateTimer.start();
diff --git a/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.cpp b/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.cpp
index a0b689f4..29850fa8 100644
--- a/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.cpp
+++ b/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.cpp
@@ -514,7 +514,6 @@ void RowTimeline::updateKeyframesFromBinding(const QList<int> &properties)
if (isVisible()) {
child->rowTimeline()->update();
- update();
} else {
// Find the first visible parent and update that to show hidden keyframes
RowTree *updateRow = m_rowTree->parentRow();
@@ -525,6 +524,7 @@ void RowTimeline::updateKeyframesFromBinding(const QList<int> &properties)
}
}
}
+ update();
}
void RowTimeline::insertKeyframe(Keyframe *keyframe)