[vlmc-devel] Timeline: Optimize clip moving especially when the view is extremely zoomed in

Yikai Lu git at videolan.org
Wed Jul 19 17:16:30 CEST 2017


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Wed Jul 19 17:16:02 2017 +0200| [376ee95b9ff4ac477c32e93542a4c1f67153451b] | committer: Yikai Lu

Timeline: Optimize clip moving especially when the view is extremely zoomed in

> https://code.videolan.org/videolan/vlmc/commit/376ee95b9ff4ac477c32e93542a4c1f67153451b
---

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

diff --git a/src/Gui/timeline/Track.qml b/src/Gui/timeline/Track.qml
index 131ed3cd..0209a753 100644
--- a/src/Gui/timeline/Track.qml
+++ b/src/Gui/timeline/Track.qml
@@ -267,7 +267,10 @@ Item {
                                     newX = oldX;
                             }
 
-                            if ( length < ptof( newX + linkedClipItem.width ) ) {
+                            // We only want to update the length when the left edge of the timeline
+                            // is exposed.
+                            if ( sView.flickableItem.contentX + page.width > sView.width &&
+                                    length < ptof( newX + linkedClipItem.width ) ) {
                                 length = ptof( newX + linkedClipItem.width );
                             }
 
@@ -278,7 +281,8 @@ Item {
                         }
                     }
 
-                    if ( length < ptof( newX + target.width ) ) {
+                    if ( sView.flickableItem.contentX + page.width > sView.width &&
+                            length < ptof( newX + target.width ) ) {
                         length = ptof( newX + target.width );
                     }
 



More information about the Vlmc-devel mailing list