diff options
author | Mahmoud Badri <mahmoud.badri@qt.io> | 2018-06-06 13:17:52 +0300 |
---|---|---|
committer | Mahmoud Badri <mahmoud.badri@qt.io> | 2018-06-06 10:30:20 +0000 |
commit | 319481d3bb532e65f76b00e77510c458b029516f (patch) | |
tree | 7d2740e1209583e10332e094808191ae22c6cabd /src/Authoring/Studio/Palettes/TimelineGraphicsView/KeyframeManager.cpp | |
parent | dfa966e0d32041b1df0acd6db7733d22614b38b0 (diff) |
Allow drag-select keyframes from an object row
Currently only possible to drag-select keyframes from property rows
Task-number: QT3DS-1886
Change-Id: I6673e5ec52a73d48f0c9cd98abc7a53a63915ee0
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/TimelineGraphicsView/KeyframeManager.cpp')
-rw-r--r-- | src/Authoring/Studio/Palettes/TimelineGraphicsView/KeyframeManager.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Authoring/Studio/Palettes/TimelineGraphicsView/KeyframeManager.cpp b/src/Authoring/Studio/Palettes/TimelineGraphicsView/KeyframeManager.cpp index e234e99e..570c3981 100644 --- a/src/Authoring/Studio/Palettes/TimelineGraphicsView/KeyframeManager.cpp +++ b/src/Authoring/Studio/Palettes/TimelineGraphicsView/KeyframeManager.cpp @@ -173,11 +173,10 @@ void KeyframeManager::selectKeyframesInRect(const QRectF &rect) m_scene->rowManager()->clampIndex(idx1); m_scene->rowManager()->clampIndex(idx2); - RowTimeline *rowTimeline; for (int i = idx1; i <= idx2; ++i) { - rowTimeline = m_scene->rowManager()->rowTimelineAt(i); + RowTimeline *rowTimeline = m_scene->rowManager()->rowTimelineAt(i); - if (rowTimeline != nullptr) { + if (rowTimeline) { const auto keyframes = rowTimeline->getKeyframesInRange(rect.left(), rect.right()); for (auto keyframe : keyframes) { if (!m_selectedKeyframes.contains(keyframe)) { @@ -402,7 +401,7 @@ bool KeyframeManager::hasSelectedKeyframes() const bool KeyframeManager::hasCopiedKeyframes() const { - return m_pasteKeyframeCommandHelper != nullptr && + return m_pasteKeyframeCommandHelper && m_pasteKeyframeCommandHelper->HasCopiedKeyframes(); } |