[vlmc-devel] [PATCH] Fix not loading sub Clips when their MediaListView is shown
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Mon Apr 4 10:24:00 CEST 2016
On 04/03/2016 01:18 PM, Yikai Lu wrote:
> ---
> 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;
>
Applied, though this is probably code which will go away with the new
media library integration.
Regards,
More information about the Vlmc-devel
mailing list