summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.h
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/ui/RowTimeline.h
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/ui/RowTimeline.h')
-rw-r--r--src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.h9
1 files changed, 7 insertions, 2 deletions
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 <QtCore/qpointer.h>
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<Keyframe *> m_keyframes;
QColor m_barColor;
+ QVector<QPointer<RowTimeline>> m_boundChildrenStart;
+ QVector<QPointer<RowTimeline>> m_boundChildrenEnd;
friend class RowTree;
};