[vlmc-devel] [PATCH 6/8] TrackWorkflow: Use insertMulti

Hugo Beauzée-Luyssen hugo at beauzee.fr
Fri May 13 11:14:32 CEST 2016


On 05/03/2016 07:24 AM, Yikai Lu wrote:
> More than one clip can be placed at a certain position.
> ---
>   src/Workflow/TrackWorkflow.cpp | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/Workflow/TrackWorkflow.cpp b/src/Workflow/TrackWorkflow.cpp
> index 295fc75..abf8736 100644
> --- a/src/Workflow/TrackWorkflow.cpp
> +++ b/src/Workflow/TrackWorkflow.cpp
> @@ -102,7 +102,7 @@ void
>   TrackWorkflow::addClip( ClipWorkflow* cw, qint64 start )
>   {
>       QWriteLocker    lock( m_clipsLock );
> -    m_clips.insert( start, cw );
> +    m_clips.insertMulti( start, cw );
>       connect( cw, SIGNAL( effectAdded( EffectHelper*, qint64 ) ),
>                this, SLOT( __effectAdded( EffectHelper*, qint64 ) ) );
>       connect( cw, SIGNAL( effectMoved( EffectHelper*, qint64 ) ),
> @@ -380,7 +380,7 @@ TrackWorkflow::moveClip( const QUuid& id, qint64 startingFrame )
>           {
>               ClipWorkflow* cw = it.value();
>               m_clips.erase( it );
> -            m_clips[startingFrame] = cw;
> +            m_clips.insertMulti( startingFrame, cw );
>               cw->requireResync();
>               computeLength();
>               emit clipMoved( this, cw->getClipHelper()->uuid(), startingFrame );
>
I disagree here, a single track can't contain multiple media at the same 
position, which media would you use for this track?


More information about the Vlmc-devel mailing list