From 1bf2df5b328e38bbae1dccc4a19d15494dd66782 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 5 Jul 2018 15:19:46 +0300 Subject: 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 Reviewed-by: Jere Tuliniemi Reviewed-by: Miikka Heikkinen --- .../Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.h') diff --git a/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.h b/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.h index 677bd6bd..4bf24bb6 100644 --- a/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.h +++ b/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.h @@ -32,6 +32,7 @@ #include "InteractiveTimelineItem.h" #include "RowTypes.h" #include "Bindings/Qt3DSDMTimelineItemProperty.h" +#include class RowTree; class RowTimelinePropertyGraph; @@ -51,6 +52,8 @@ public: void setRowTree(RowTree *rowTree); void updatePosition(); void startDurationMove(double clickX); + void updateBoundChildren(bool start); + void clearBoundChildren(); void moveDurationBy(double dx); void moveDurationTo(double newX); void setStartTime(double startTime); @@ -86,8 +89,8 @@ protected: void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override; private: - void updateChildrenStartRecursive(RowTree *rowTree, double oldStartX); - void updateChildrenEndRecursive(RowTree *rowTree, double oldEndX); + void updateChildrenStartRecursive(); + void updateChildrenEndRecursive(); void updateChildrenMinStartXRecursive(RowTree *rowTree); void updateChildrenMaxEndXRecursive(RowTree *rowTree); void drawColorPropertyGradient(QPainter *painter, int width); @@ -111,6 +114,8 @@ private: QString m_controllerDataInput; QList m_keyframes; QColor m_barColor; + QVector> m_boundChildrenStart; + QVector> m_boundChildrenEnd; friend class RowTree; }; -- cgit v1.2.3