[vlmc-devel] Timeline: Fix sortSelectedClips

Yikai Lu git at videolan.org
Thu Jul 20 15:32:36 CEST 2017


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Thu Jul 20 13:52:26 2017 +0200| [386dd703f007c95d02e15c60a0b772be5a6d8a39] | committer: Yikai Lu

Timeline: Fix sortSelectedClips

> https://code.videolan.org/videolan/vlmc/commit/386dd703f007c95d02e15c60a0b772be5a6d8a39
---

 src/Gui/timeline/main.qml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/Gui/timeline/main.qml b/src/Gui/timeline/main.qml
index 97a2c4ef..23785261 100644
--- a/src/Gui/timeline/main.qml
+++ b/src/Gui/timeline/main.qml
@@ -298,7 +298,7 @@ Rectangle {
     // Sort clips in a manner that clips won't overlap each other while they are being moved
     function sortSelectedClips() {
         // Workaround: We cannot sort selectedClips directly maybe because of a Qt bug
-        var sorted = selectedClips.slice();
+        var sorted = selectedClips.concat();
         sorted.sort(
                     function( clipAUuid, clipBUuid )
                     {
@@ -323,6 +323,7 @@ Rectangle {
                         return 0;
                     }
                     );
+        selectedClips = sorted;
     }
 
     function dragFinished() {



More information about the Vlmc-devel mailing list