[vlmc-devel] Load Library/Workflow after cleared
Yikai Lu
git at videolan.org
Sat Apr 9 22:18:16 CEST 2016
vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Sat Apr 9 11:44:14 2016 +0900| [ce31b7da94d74aac3fa3905ba35d7e67161d1ff6] | committer: Hugo Beauzée-Luyssen
Load Library/Workflow after cleared
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> https://code.videolan.org/videolan/vlmc/commit/ce31b7da94d74aac3fa3905ba35d7e67161d1ff6
---
src/Library/Library.cpp | 1 +
src/Workflow/MainWorkflow.cpp | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/Library/Library.cpp b/src/Library/Library.cpp
index fdd1fe8..16a1b0c 100644
--- a/src/Library/Library.cpp
+++ b/src/Library/Library.cpp
@@ -68,6 +68,7 @@ Library::preSave()
void
Library::postLoad()
{
+ clear();
for ( const auto& var : m_settings->value( "medias" )->get().toList() )
createMediaFromVariant( var );
diff --git a/src/Workflow/MainWorkflow.cpp b/src/Workflow/MainWorkflow.cpp
index 264982b..f144353 100644
--- a/src/Workflow/MainWorkflow.cpp
+++ b/src/Workflow/MainWorkflow.cpp
@@ -337,6 +337,7 @@ MainWorkflow::preSave()
void
MainWorkflow::postLoad()
{
+ clear();
QVariantList l = m_settings->value( "tracks" )->get().toList();
for ( unsigned int i = 0; i < Workflow::NbTrackType; ++i )
m_tracks[i]->loadFromVariant( l[i] );
More information about the Vlmc-devel
mailing list