[vlmc-devel] Timeline: Fix not moving all the clips supposed to be moved

Hugo Beauzée-Luyssen hugo at beauzee.fr
Thu Jul 13 10:18:17 CEST 2017


On Sat, Jul 1, 2017, at 02:55 PM, Yikai Lu wrote:
> vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Sat Jul  1
> 21:53:16 2017 +0900| [442f22b306c9f0bf2c0b11b7fa1a9da4fbd20cf4] |
> committer: Yikai Lu
> 
> Timeline: Fix not moving all the clips supposed to be moved
> 
> > https://code.videolan.org/videolan/vlmc/commit/442f22b306c9f0bf2c0b11b7fa1a9da4fbd20cf4
> ---
> 
>  src/Gui/timeline/main.qml | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/src/Gui/timeline/main.qml b/src/Gui/timeline/main.qml
> index 77ad6b70..8c7dd1e7 100644
> --- a/src/Gui/timeline/main.qml
> +++ b/src/Gui/timeline/main.qml
> @@ -323,10 +323,14 @@ Rectangle {
>  
>      function dragFinished() {
>          sortSelectedClips();
> +
> +        // We don't want to rely on selectedClips while moving since it
> "will" be changed
> +        // I'm aware that it's not the best solution but it's the safest
> solution for sure
> +        var toMove = [];
>          for ( var i = 0; i < selectedClips.length; ++i )
> -        {
> -            moveClipTo( selectedClips[i].uuid,
> selectedClips[i].newTrackId, selectedClips[i].position );
> -        }
> +            toMove.push( [selectedClips[i].uuid,
> selectedClips[i].newTrackId, selectedClips[i].position] );
> +        for ( i = 0; i < toMove.length; ++i )
> +            moveClipTo( toMove[i][0], toMove[i][1], toMove[i][2] );
>  
>          adjustTracks( "Audio" );
>          adjustTracks( "Video" );
> 
> _______________________________________________
> Vlmc-devel mailing list
> Vlmc-devel at videolan.org
> https://mailman.videolan.org/listinfo/vlmc-devel

This and the previous commit seem to move the responsibility of managing
linked clips to the UI instead of the backend/workflow, I don't think
that's the correct way of doing it

-- 
  Hugo Beauzée-Luyssen
  hugo at beauzee.fr


More information about the Vlmc-devel mailing list