[vlmc-devel] [PATCH] Fix not loading sub Clips when their MediaListView is shown

Yikai Lu luyikei.qmltu at gmail.com
Sun Apr 3 13:18:13 CEST 2016


---
 src/Gui/library/MediaListView.cpp | 1 +
 src/Library/MediaContainer.cpp    | 7 +++++++
 src/Library/MediaContainer.h      | 5 +++++
 3 files changed, 13 insertions(+)

diff --git a/src/Gui/library/MediaListView.cpp b/src/Gui/library/MediaListView.cpp
index 548ea6d..cce9e5b 100644
--- a/src/Gui/library/MediaListView.cpp
+++ b/src/Gui/library/MediaListView.cpp
@@ -112,6 +112,7 @@ MediaListView::showSubClips( const QUuid &uuid )
     Clip    *clip = m_mediaContainer->clip( uuid );
     MediaListView* view = new MediaListView( m_nav );
     view->setMediaContainer( clip->getChilds() );
+    clip->getChilds()->reloadAllClips();
     m_nav->pushViewController( view );
 }
 
diff --git a/src/Library/MediaContainer.cpp b/src/Library/MediaContainer.cpp
index f7e8f10..570a946 100644
--- a/src/Library/MediaContainer.cpp
+++ b/src/Library/MediaContainer.cpp
@@ -176,6 +176,13 @@ MediaContainer::clips() const
     return m_clips;
 }
 
+void
+MediaContainer::reloadAllClips()
+{
+    for ( auto *c: m_clips )
+        emit newClipLoaded( c );
+}
+
 Clip*
 MediaContainer::getParent()
 {
diff --git a/src/Library/MediaContainer.h b/src/Library/MediaContainer.h
index 603653c..d54e723 100644
--- a/src/Library/MediaContainer.h
+++ b/src/Library/MediaContainer.h
@@ -111,6 +111,11 @@ public:
      */
     const QHash<QUuid, Clip*>   &clips() const;
 
+    /**
+     *  \breif  Emit newClipLoaded from all clips
+     */
+    void                        reloadAllClips();
+
     Clip*       getParent();
 
     quint32     count() const;
-- 
1.9.1



More information about the Vlmc-devel mailing list