summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Palettes/TimelineGraphicsView/RowMover.cpp
diff options
context:
space:
mode:
authorMahmoud Ali <Mahmoud.Badri@qt.io>2018-04-27 11:43:22 +0300
committerMahmoud Badri <mahmoud.badri@qt.io>2018-04-30 07:02:19 +0000
commit6e53c241371d4b8092d5b65db98dd87a308b88f6 (patch)
tree9f52df4d53d8fc897f087d1e3d8ff4f8c555fb75 /src/Authoring/Studio/Palettes/TimelineGraphicsView/RowMover.cpp
parent6abac7af910abe2a1644d75542b2e6defe2ebc4d (diff)
Rewrite the logic for adding/removing/moving rows
This fixes several issues and improve the timeline performance. Task-number: QT3DS-1496 Task-number: QT3DS-1493 Task-number: QT3DS-1476 Change-Id: I1e838d0107317abd6dc7267a8eb82fa56e076390 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/TimelineGraphicsView/RowMover.cpp')
-rw-r--r--src/Authoring/Studio/Palettes/TimelineGraphicsView/RowMover.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/Authoring/Studio/Palettes/TimelineGraphicsView/RowMover.cpp b/src/Authoring/Studio/Palettes/TimelineGraphicsView/RowMover.cpp
index 44a521dd..c63d71fd 100644
--- a/src/Authoring/Studio/Palettes/TimelineGraphicsView/RowMover.cpp
+++ b/src/Authoring/Studio/Palettes/TimelineGraphicsView/RowMover.cpp
@@ -71,21 +71,11 @@ void RowMover::resetInsertionParent(RowTree *newTarget)
}
}
-int RowMover::sourceIndex() const
-{
- return m_sourceIndex;
-}
-
int RowMover::targetIndex() const
{
return m_targetIndex;
}
-bool RowMover::movingDown() const
-{
- return m_targetIndex >= m_sourceIndex;
-}
-
RowTree *RowMover::sourceRow() const
{
return m_sourceRow;
@@ -96,10 +86,9 @@ bool RowMover::isActive()
return m_active;
}
-void RowMover::start(RowTree *row, int index)
+void RowMover::start(RowTree *row)
{
m_sourceRow = row;
- m_sourceIndex = index;
m_active = true;
m_sourceRow->setMoveSourceRecursive(true);
@@ -114,7 +103,6 @@ void RowMover::end()
m_active = false;
m_sourceRow = nullptr;
- m_sourceIndex = -1;
setVisible(false);
resetInsertionParent();