QmlDesigner: Use AbstractView::currentTimeline

There should be only 'one' current timeline. Let's keep the QTC_ASSERT
until we know this does not introduce issues.

Change-Id: I1518bef39b290732bda5dc6e5fc571c33f7407f2
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2021-04-20 16:19:40 +02:00
parent 638db3c35b
commit 4022e330fb

View File

@@ -511,7 +511,11 @@ QGraphicsView *AbstractScrollGraphicsScene::rulerView() const
QmlTimeline TimelineGraphicsScene::currentTimeline() const
{
return QmlTimeline(timelineModelNode());
QmlTimeline timeline(timelineModelNode());
if (timeline.isValid()) {
QTC_ASSERT(timeline == timelineView()->currentTimeline(), ;);
}
return timelineView()->currentTimeline();
}
QRectF AbstractScrollGraphicsScene::selectionBounds() const