[vlmc-devel] Timeline: Don't use magnet between two selected clips

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


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Thu Jul 20 14:19:37 2017 +0200| [f9f71f784acedd6273170e709745442d1d5db45d] | committer: Yikai Lu

Timeline: Don't use magnet between two selected clips

> https://code.videolan.org/videolan/vlmc/commit/f9f71f784acedd6273170e709745442d1d5db45d
---

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

diff --git a/src/Gui/timeline/Track.qml b/src/Gui/timeline/Track.qml
index 482a2109..6716bee8 100644
--- a/src/Gui/timeline/Track.qml
+++ b/src/Gui/timeline/Track.qml
@@ -94,8 +94,10 @@ Item {
                         var cw = ftop( clip["end"] - clip["begin"] + 1);
                         // Set a right position
                         //
-                        // HACK: If magnetic mode, consider clips bigger.
-                        var clipMargin = useMagneticMode ? magneticMargin : 0;
+                        // HACK: If magnetic mode, consider clips bigger
+                        //       but not if it's also selected because both of them will be moving
+                        //       and we want to keep the same distance between them as much as possible
+                        var clipMargin = useMagneticMode && findClipItem( clip.uuid ).selected === false ? magneticMargin : 0;
                         if ( cx  + cw > newX && newX + sw > cx )
                             isCollided = true;
 



More information about the Vlmc-devel mailing list