[vlmc-devel] Fix not loading sub Clips when their MediaListView is shown
Yikai Lu
git at videolan.org
Mon Apr 4 10:25:54 CEST 2016
vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Sun Apr 3 20:18:13 2016 +0900| [ac1811617a69324e9f2c171b8875e80950112dc5] | committer: Hugo Beauzée-Luyssen
Fix not loading sub Clips when their MediaListView is shown
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> https://code.videolan.org/videolan/vlmc/commit/ac1811617a69324e9f2c171b8875e80950112dc5
---
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;
More information about the Vlmc-devel
mailing list