[vlmc-devel] Workflow: Change ordering of the arguments of moveClip

Yikai Lu git at videolan.org
Tue Jul 26 16:12:46 CEST 2016


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Tue Jul 26 21:51:09 2016 +0900| [77c08c995baf42d4e34d02982343b64b6eeb9dd7] | committer: Yikai Lu

Workflow: Change ordering of the arguments of moveClip

> https://code.videolan.org/videolan/vlmc/commit/77c08c995baf42d4e34d02982343b64b6eeb9dd7
---

 src/Gui/timeline/main.qml     | 8 +++++++-
 src/Workflow/MainWorkflow.cpp | 2 +-
 src/Workflow/MainWorkflow.h   | 2 +-
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/Gui/timeline/main.qml b/src/Gui/timeline/main.qml
index ea518c4..dc16329 100644
--- a/src/Gui/timeline/main.qml
+++ b/src/Gui/timeline/main.qml
@@ -183,7 +183,7 @@ Rectangle {
         if ( !clip )
             return;
         clip.position = position;
-        workflow.moveClip( trackId, uuid, position );
+        workflow.moveClip( uuid, trackId, position );
     }
 
     function adjustTracks( trackType ) {
@@ -289,6 +289,12 @@ Rectangle {
         // Never show the background behind the timeline
         if ( newContentX >= 0 && sView.flickableItem.contentWidth - newContentX > sView.width  )
             sView.flickableItem.contentX = newContentX;
+
+        if ( ratio > 1 )
+            scale++;
+        else
+            scale--;
+        mainwindow.setScale( scale );
     }
 
     function dragFinished() {
diff --git a/src/Workflow/MainWorkflow.cpp b/src/Workflow/MainWorkflow.cpp
index 1f05c93..c122c69 100644
--- a/src/Workflow/MainWorkflow.cpp
+++ b/src/Workflow/MainWorkflow.cpp
@@ -226,7 +226,7 @@ MainWorkflow::clipInfo( const QString& uuid )
 }
 
 void
-MainWorkflow::moveClip( quint32 trackId, const QString& uuid, qint64 startFrame )
+MainWorkflow::moveClip( const QString& uuid, quint32 trackId, qint64 startFrame )
 {
     for ( auto it = m_clips.begin(); it != m_clips.end(); ++it )
     {
diff --git a/src/Workflow/MainWorkflow.h b/src/Workflow/MainWorkflow.h
index 52fee83..ed8b389 100644
--- a/src/Workflow/MainWorkflow.h
+++ b/src/Workflow/MainWorkflow.h
@@ -149,7 +149,7 @@ class   MainWorkflow : public QObject
         QJsonObject             clipInfo( const QString& uuid );
 
         Q_INVOKABLE
-        void                    moveClip( quint32 trackId, const QString& uuid, qint64 startFrame );
+        void                    moveClip( const QString& uuid, quint32 trackId, qint64 startFrame );
 
         Q_INVOKABLE
         void                    resizeClip( const QString& uuid, qint64 newBegin,



More information about the Vlmc-devel mailing list