diff options
Diffstat (limited to 'src/Authoring/Studio/Palettes/TimelineGraphicsView/ui')
-rw-r--r-- | src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.cpp | 15 | ||||
-rw-r--r-- | src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.h | 2 |
2 files changed, 3 insertions, 14 deletions
diff --git a/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.cpp b/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.cpp index 0c58f7dd..e768283d 100644 --- a/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.cpp +++ b/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.cpp @@ -285,26 +285,15 @@ Keyframe *RowTimeline::getClickedKeyframe(const QPointF &scenePos) return nullptr; } -QList<Keyframe *> RowTimeline::getKeyframesInRange(const double left, const double right) +QList<Keyframe *> RowTimeline::getKeyframesInRange(double left, double right) { double x; double x1 = mapFromScene(left, 0).x(); double x2 = mapFromScene(right, 0).x(); QList<Keyframe *> result; - QList<Keyframe *> keyframes; - if (m_rowTree->hasPropertyChildren()) { - const auto childRows = m_rowTree->childRows(); - for (auto child : childRows) { - if (child->isProperty()) - keyframes.append(child->rowTimeline()->m_keyframes); - } - } else { - keyframes = m_keyframes; - } - - for (auto keyframe : qAsConst(keyframes)) { + for (auto keyframe : qAsConst(m_keyframes)) { x = timeToX(keyframe->time); if (x1 < x && x2 > x) diff --git a/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.h b/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.h index 3c12a26a..831c02e0 100644 --- a/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.h +++ b/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTimeline.h @@ -76,7 +76,7 @@ public: RowTimeline *parentRow() const; RowTree *rowTree() const; Keyframe *getClickedKeyframe(const QPointF &scenePos); - QList<Keyframe *> getKeyframesInRange(const double left, const double right); + QList<Keyframe *> getKeyframesInRange(double left, double right); QList<Keyframe *> keyframes() const; void showToolTip(const QPointF &pos); |