[vlmc-devel] TrackWorkflow: Use insertMulti

Yikai Lu git at videolan.org
Wed Jun 1 18:14:52 CEST 2016


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Tue May  3 13:07:27 2016 +0900| [d300289e2a00311f90a72a1a8c32979efe25c0d8] | committer: Hugo Beauzée-Luyssen

TrackWorkflow: Use insertMulti

More than one clip can be placed at a certain position.

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> https://code.videolan.org/videolan/vlmc/commit/d300289e2a00311f90a72a1a8c32979efe25c0d8
---

 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 );



More information about the Vlmc-devel mailing list