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

yikei lu luyikei.qmltu at gmail.com
Thu Jul 13 11:37:21 CEST 2017


On Thu, Jul 13, 2017 at 5:18 PM, Hugo Beauzée-Luyssen <hugo at beauzee.fr> wrote:
> 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
>

Hi,

> 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

I agree that we should implement it in the backend but we must ensure
that it should behave the same as the frontend. And it was different.
Sometimes linking used to destroy the timeline in a manner that some
clips may completely overlap other clips.

I'm not really sure the correct way to implement linking in the
backend still so we may as well discuss it.

Regards,

>
> --
>   Hugo Beauzée-Luyssen
>   hugo at beauzee.fr
> _______________________________________________
> Vlmc-devel mailing list
> Vlmc-devel at videolan.org
> https://mailman.videolan.org/listinfo/vlmc-devel


More information about the Vlmc-devel mailing list