diff options
Diffstat (limited to 'src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/RowManager.cpp')
-rw-r--r-- | src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/RowManager.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/RowManager.cpp b/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/RowManager.cpp index b250062c..70a18560 100644 --- a/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/RowManager.cpp +++ b/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/RowManager.cpp @@ -292,15 +292,13 @@ void RowManager::updateRulerDuration(bool updateMaxDuration) long maxDuration = 0; // for setting correct size for the view so scrollbars appear correctly if (m_layoutTree->count() > 1) { auto rootRow = static_cast<RowTree *>(m_layoutTree->itemAt(1)->graphicsItem()); - bool isComponent = rootRow->objectType() == OBJTYPE_COMPONENT; - for (int i = 1; i < m_layoutTree->count(); ++i) { + bool insideComponent = rootRow->objectType() == OBJTYPE_COMPONENT; + for (int i = 2; i < m_layoutTree->count(); ++i) { RowTree *row_i = static_cast<RowTree *>(m_layoutTree->itemAt(i)->graphicsItem()); long dur_i = row_i->rowTimeline()->getEndTime(); - if (((isComponent && i != 1) || row_i->objectType() == OBJTYPE_LAYER) - && dur_i > duration) { + if ((insideComponent || row_i->objectType() == OBJTYPE_LAYER) && dur_i > duration) duration = dur_i; - } if (dur_i > maxDuration) maxDuration = dur_i; |