[vlmc-devel] Timeline: Simplify moveClipTo

Yikai Lu git at videolan.org
Sat Jul 23 12:06:27 CEST 2016


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Sat Jul 23 18:02:30 2016 +0900| [64a4bc18c4520a2308ace9749e869373859e8622] | committer: Yikai Lu

Timeline: Simplify moveClipTo

> https://code.videolan.org/videolan/vlmc/commit/64a4bc18c4520a2308ace9749e869373859e8622
---

 src/Gui/timeline/main.qml | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/Gui/timeline/main.qml b/src/Gui/timeline/main.qml
index b66ba2a..07022a2 100644
--- a/src/Gui/timeline/main.qml
+++ b/src/Gui/timeline/main.qml
@@ -179,12 +179,10 @@ Rectangle {
 
     function moveClipTo( trackType, uuid, trackId, position )
     {
-        var clip = findClipFromTrackContainer( trackType, uuid );
+        var clip = findClipItem( uuid );
         if ( !clip )
             return;
-        var oldId = clip["trackId"];
-        clip["trackId"] = trackId;
-        findClipItem( uuid ).position = position;
+        clip.position = position;
         workflow.moveClip( trackId, uuid, position );
     }
 



More information about the Vlmc-devel mailing list