Commit 5497cf4f authored by luyikei's avatar luyikei

Track.qml: Remove now useless code

parent 3a05ad35
...@@ -223,15 +223,8 @@ Item { ...@@ -223,15 +223,8 @@ Item {
if ( drag.source.x !== findNewPosition( drag.source.x, drag.source, false ) ) if ( drag.source.x !== findNewPosition( drag.source.x, drag.source, false ) )
deltaX = 0; deltaX = 0;
else { else
// Optimization: Delta delta X should be 0 deltaX = drag.source.x - lastX;
if ( ptof( deltaX ) === ptof( drag.source.x - lastX ) && drag.source.x !== 0 ) {
lastX = drag.source.x;
return;
}
else
deltaX = drag.source.x - lastX;
}
} }
else else
deltaX = drag.x - lastX; deltaX = drag.x - lastX;
...@@ -279,15 +272,6 @@ Item { ...@@ -279,15 +272,6 @@ Item {
length = ptof( newX + target.width ); 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 ); target.setPixelPosition( newX );
toMove.splice( 0, 1 ); toMove.splice( 0, 1 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment