[vlmc-devel] Track.qml: Remove now useless code

Yikai Lu git at videolan.org
Thu Jul 6 14:12:17 CEST 2017


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Thu Jul  6 19:49:04 2017 +0900| [5497cf4fb70468a0373e78e3cf601699a4ce2d15] | committer: Yikai Lu

Track.qml: Remove now useless code

> https://code.videolan.org/videolan/vlmc/commit/5497cf4fb70468a0373e78e3cf601699a4ce2d15
---

 src/Gui/timeline/Track.qml | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/src/Gui/timeline/Track.qml b/src/Gui/timeline/Track.qml
index 067aff7a..58f8377e 100644
--- a/src/Gui/timeline/Track.qml
+++ b/src/Gui/timeline/Track.qml
@@ -223,15 +223,8 @@ Item {
 
                     if ( drag.source.x !== findNewPosition( drag.source.x, drag.source, false ) )
                         deltaX = 0;
-                    else {
-                        // Optimization: Delta delta X should be 0
-                        if ( ptof( deltaX ) === ptof( drag.source.x - lastX ) && drag.source.x !== 0 ) {
-                            lastX = drag.source.x;
-                            return;
-                        }
-                        else
-                            deltaX = drag.source.x - lastX;
-                    }
+                    else
+                        deltaX = drag.source.x - lastX;
                 }
                 else
                     deltaX = drag.x - lastX;
@@ -279,15 +272,6 @@ Item {
                         length = ptof( newX + target.width );
                     }
 
-                    // Recalculate deltaX in case of drag.source being moved
-                    if ( drag.source === target ) {
-                        if ( oldTrackId === target.newTrackId )
-                            deltaX = newX - oldX;
-                        else
-                            // Don't move other clips if drag.source's track is changed
-                            deltaX = 0;
-                    }
-
                     target.setPixelPosition( newX );
                     toMove.splice( 0, 1 );
 



More information about the Vlmc-devel mailing list