Commit ca5b74c4 authored by luyikei's avatar luyikei Committed by Hugo Beauzée-Luyssen

Library: Fix not loading subclips

parent 28fafd98
......@@ -83,8 +83,12 @@ Library::postLoad()
{
for ( const auto& var : m_settings->value( "medias" )->get().toList() )
{
auto m = Media::fromVariant( var );
auto map = var.toMap();
auto subClipsMap = map["clips"].toMap();
map["clips"] = QVariant();
auto m = Media::fromVariant( map );
addMedia( m );
m->loadSubclip( subClipsMap );
}
}
......
......@@ -103,12 +103,10 @@ public:
const Backend::IInput* input() const;
static QSharedPointer<Media> fromVariant( const QVariant& v );
QSharedPointer<Clip> loadSubclip( const QVariantMap& m );
QString snapshot();
private:
QSharedPointer<Clip> loadSubclip( const QVariantMap& m );
protected:
std::unique_ptr<Backend::IInput> m_input;
medialibrary::MediaPtr m_mlMedia;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment