[vlmc-devel] Timeline: Simplify centering drag.source
Yikai Lu
git at videolan.org
Tue Jul 26 16:12:39 CEST 2016
vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Tue Jul 26 21:42:29 2016 +0900| [32cb222fdacd46bbf9ae8d7c5067057393038f2e] | committer: Yikai Lu
Timeline: Simplify centering drag.source
> https://code.videolan.org/videolan/vlmc/commit/32cb222fdacd46bbf9ae8d7c5067057393038f2e
---
src/Gui/timeline/Clip.qml | 1 +
src/Gui/timeline/Track.qml | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/Gui/timeline/Clip.qml b/src/Gui/timeline/Clip.qml
index fecb2cb..19533f1 100644
--- a/src/Gui/timeline/Clip.qml
+++ b/src/Gui/timeline/Clip.qml
@@ -250,6 +250,7 @@ Rectangle {
}
onYChanged: {
+ y -= y % trackHeight;
// Don't move outside its TrackContainer
// For Top
var yToMoveUp = track.mapToItem( container, 0, 0 ).y + y;
diff --git a/src/Gui/timeline/Track.qml b/src/Gui/timeline/Track.qml
index acc8fd9..5cce650 100644
--- a/src/Gui/timeline/Track.qml
+++ b/src/Gui/timeline/Track.qml
@@ -249,8 +249,6 @@ Item {
}
}
- drag.source.y = drag.source.y - drag.y + track.height / 2 - 1; // Adjust to the center
-
// Optimization: Delta delta X should be different
if ( deltaX === drag.source.x - lastX ) {
lastX = drag.source.x;
More information about the Vlmc-devel
mailing list