Skip to content
Snippets Groups Projects
Commit 4bcd3d1d authored by luyikei's avatar luyikei
Browse files

Timeline: Clear when MainWorkflow is cleared

parent 0079c892
No related branches found
No related tags found
No related merge requests found
......@@ -49,6 +49,13 @@ Timeline::Timeline( MainWindow* parent )
m_view->rootContext()->setContextProperty( QStringLiteral( "mainwindow" ), parent );
m_view->rootContext()->setContextProperty( QStringLiteral( "workflow" ), Core::instance()->workflow() );
m_view->setSource( QUrl( QStringLiteral( "qrc:/QML/main.qml" ) ) );
connect( Core::instance()->workflow(), &MainWorkflow::cleared, this, [this]()
{
m_view->setSource( QUrl() );
m_view->engine()->clearComponentCache();
m_view->setSource( QUrl( QStringLiteral( "qrc:/QML/main.qml" ) ) );
} );
}
Timeline::~Timeline()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment