[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdenlive/refactoring_timeline] src/timeline2/view/qml: Don't show bubble info about frame if clip i
From:       Jean-Baptiste Mardelle <null () kde ! org>
Date:       2017-10-31 15:09:30
Message-ID: E1e9YAU-0000AJ-3j () code ! kde ! org
[Download RAW message or body]

Git commit 906f457a6c111516d2f65ad7ce80558bcf5581c3 by Jean-Baptiste Mardelle.
Committed on 31/10/2017 at 12:31.
Pushed by mardelle into branch 'refactoring_timeline'.

Don't show bubble info about frame if clip is not moved in timeline

M  +6    -6    src/timeline2/view/qml/Track.qml
M  +10   -8    src/timeline2/view/qml/timeline.qml

https://commits.kde.org/kdenlive/906f457a6c111516d2f65ad7ce80558bcf5581c3

diff --git a/src/timeline2/view/qml/Track.qml b/src/timeline2/view/qml/Track.qml
index b62021fa0..6be62dcaa 100644
--- a/src/timeline2/view/qml/Track.qml
+++ b/src/timeline2/view/qml/Track.qml
@@ -273,10 +273,10 @@ Column{
                     clip.x = clip.draggedX
                 } else {
                     clip.x = frame * timeScale
+                    var mapped = trackRoot.mapFromItem(clip, mouse.x, mouse.y)
+                    trackRoot.clipDragged(clip, mapped.x, mapped.y)
+                    clip.draggedX = clip.x
                 }
-                var mapped = trackRoot.mapFromItem(clip, mouse.x, mouse.y)
-                trackRoot.clipDragged(clip, mapped.x, mapped.y)
-                clip.draggedX = clip.x
             }
             onTrimmingIn: {
                 var new_duration = controller.requestItemResize(clip.clipId, \
newDuration, false, false, root.snapping) @@ -374,10 +374,10 @@ Column{
                     clip.x = clip.draggedX
                 } else {
                     clip.x = frame * timeScale
+                    var mapped = trackRoot.mapFromItem(clip, mouse.x, mouse.y)
+                    trackRoot.clipDragged(clip, mapped.x, mapped.y)
+                    clip.draggedX = clip.x
                 }
-                var mapped = trackRoot.mapFromItem(clip, mouse.x, mouse.y)
-                trackRoot.clipDragged(clip, mapped.x, mapped.y)
-                clip.draggedX = clip.x
             }
             onTrimmingIn: {
                 if (controller.requestItemResize(clip.clipId, newDuration, false, \
                false, root.snapping)) {
diff --git a/src/timeline2/view/qml/timeline.qml \
b/src/timeline2/view/qml/timeline.qml index 6524c0700..a62700b7e 100644
--- a/src/timeline2/view/qml/timeline.qml
+++ b/src/timeline2/view/qml/timeline.qml
@@ -881,15 +881,17 @@ Rectangle {
             onClipDragged: {
                 continuousScrolling(x)
                 // Show distance moved as time in a "bubble" help.
-                var track = tracksRepeater.itemAt(clip.trackIndex)
                 var delta = Math.round((clip.x - clip.originalX) / \
                timeline.scaleFactor)
-                var s = timeline.timecode(Math.abs(delta))
-                // remove leading zeroes
-                if (s.substring(0, 3) === '00:')
-                    s = s.substring(3)
-                s = ((delta < 0)? '-' : (delta > 0)? '+' : '') + s
-                bubbleHelp.show(x, track.y + height/2, s)
-                clipBeingMovedId = clip.clipId
+                if (delta != 0) {
+                    var track = tracksRepeater.itemAt(clip.trackIndex)
+                    var s = timeline.timecode(Math.abs(delta))
+                    // remove leading zeroes
+                    if (s.substring(0, 3) === '00:')
+                        s = s.substring(3)
+                    s = ((delta < 0)? '-' : (delta > 0)? '+' : '') + s
+                    bubbleHelp.show(x, track.y + height/2, s)
+                    clipBeingMovedId = clip.clipId
+                }
             }
             onClipDropped: {
                 console.log(" + + + ++ + DROPPED  + + + + + + +");


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic