diff options
author | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2018-06-06 12:38:59 +0300 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2018-06-06 10:14:02 +0000 |
commit | dfa966e0d32041b1df0acd6db7733d22614b38b0 (patch) | |
tree | fd9e2daae3cc646203de76a44ea866e342db4507 /src/Authoring/Studio/Palettes/TimelineGraphicsView/TimelineGraphicsScene.cpp | |
parent | 0bd168dc0e53af8fee8a0084cf3d57dda00bcb81 (diff) |
Fix adjusting timebar by dragging start/end handles
In case of overlapping start and end handles, now choose the handle
depending on the click position relative to start of the bar.
Never select start handle if end time is zero.
Also allow adjusting the duration to actual zero instead of just very
close to it.
Task-number: QT3DS-1869
Change-Id: I57d06c6e70bb22fd320bcd01adf021a15f13caf6
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/TimelineGraphicsView/TimelineGraphicsScene.cpp')
-rw-r--r-- | src/Authoring/Studio/Palettes/TimelineGraphicsView/TimelineGraphicsScene.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Authoring/Studio/Palettes/TimelineGraphicsView/TimelineGraphicsScene.cpp b/src/Authoring/Studio/Palettes/TimelineGraphicsView/TimelineGraphicsScene.cpp index 643d8f09..de682be3 100644 --- a/src/Authoring/Studio/Palettes/TimelineGraphicsView/TimelineGraphicsScene.cpp +++ b/src/Authoring/Studio/Palettes/TimelineGraphicsView/TimelineGraphicsScene.cpp @@ -360,9 +360,9 @@ void TimelineGraphicsScene::mousePressEvent(QGraphicsSceneMouseEvent *event) m_editedTimelineRow->getClickedControl(m_pressPos); // clicked an empty spot on a timeline row, start selection rect. - if (m_clickedTimelineControlType == TimelineControlType::None) + if (m_clickedTimelineControlType == TimelineControlType::None) { m_selectionRect->start(m_pressPos); - else if (m_clickedTimelineControlType == TimelineControlType::Duration) { + } else if (m_clickedTimelineControlType == TimelineControlType::Duration) { if (!ctrlKeyDown && m_rowManager->isRowSelected(m_editedTimelineRow->rowTree()) && !m_rowManager->isSingleSelected() ) { |