summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Palettes/TimelineGraphicsView/RowManager.cpp
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2018-07-05 15:19:46 +0300
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2018-07-05 12:37:28 +0000
commit1bf2df5b328e38bbae1dccc4a19d15494dd66782 (patch)
tree90f3011c4c009d86fdaadb77e0e6c016a9f25e7a /src/Authoring/Studio/Palettes/TimelineGraphicsView/RowManager.cpp
parentae206ce4aaed605a16510233cc6eb17d1840efa3 (diff)
Only check for bound children at the start of the drag/set bar time
Checking for bound children at every mouse move/set bar time change caused child bars to be added to the drag/time change set if some intermediate start/end value matched the child bar start/end value. The document didn't update start/end for these bars, however, leading to inconsistent state between UI and document. Task-number: QT3DS-1979 Change-Id: I2d7b3877d82ddfd26989d6b6ae620cda7e3ca783 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/TimelineGraphicsView/RowManager.cpp')
-rw-r--r--src/Authoring/Studio/Palettes/TimelineGraphicsView/RowManager.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Authoring/Studio/Palettes/TimelineGraphicsView/RowManager.cpp b/src/Authoring/Studio/Palettes/TimelineGraphicsView/RowManager.cpp
index 565960cf..0c85f225 100644
--- a/src/Authoring/Studio/Palettes/TimelineGraphicsView/RowManager.cpp
+++ b/src/Authoring/Studio/Palettes/TimelineGraphicsView/RowManager.cpp
@@ -94,9 +94,11 @@ RowTree *RowManager::createRowFromBinding(ITimelineItemBinding *binding, RowTree
// set row start/end time & color
ITimelineTimebar *timebar = binding->GetTimelineItem()->GetTimebar();
- newRow->rowTimeline()->setStartTime(timebar->GetStartTime() * .001);
- newRow->rowTimeline()->setEndTime(timebar->GetEndTime() * .001);
- newRow->rowTimeline()->setBarColor(timebar->GetTimebarColor());
+ RowTimeline *rowTimeline = newRow->rowTimeline();
+ rowTimeline->clearBoundChildren();
+ rowTimeline->setStartTime(timebar->GetStartTime() * .001);
+ rowTimeline->setEndTime(timebar->GetEndTime() * .001);
+ rowTimeline->setBarColor(timebar->GetTimebarColor());
// create property rows
for (int i = 0; i < binding->GetPropertyCount(); i++) {