[vlmc-devel] commit: Revert "Timeline: Don't save begin and end are they are useless." ( Hugo Beauzee-Luyssen )

git at videolan.org git at videolan.org
Sat Mar 13 16:10:35 CET 2010


vlmc | branch: master | Hugo Beauzee-Luyssen <beauze.h at gmail.com> | Sat Mar 13 16:05:46 2010 +0100| [1872862ec30c50f98e3cd177472978bb4c80e081] | committer: Hugo Beauzee-Luyssen 

Revert "Timeline: Don't save begin and end are they are useless."

This reverts commit 494f1396b92bcdd8e1e77ebe2915659f12180362.
Turns out they were not that useless...

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=1872862ec30c50f98e3cd177472978bb4c80e081
---

 src/Workflow/MainWorkflow.cpp  |    7 ++++++-
 src/Workflow/TrackWorkflow.cpp |    2 ++
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/Workflow/MainWorkflow.cpp b/src/Workflow/MainWorkflow.cpp
index 3b30965..b81b8d3 100644
--- a/src/Workflow/MainWorkflow.cpp
+++ b/src/Workflow/MainWorkflow.cpp
@@ -316,9 +316,13 @@ MainWorkflow::loadProject( const QDomElement &root )
         {
             //Iterate over clip fields:
             QString                     uuid;
+            QString                     begin;
+            QString                     end;
             QString                     startFrame;
 
             uuid = clip.attribute( "uuid" );
+            begin = clip.attribute( "begin" );
+            end = clip.attribute( "end" );
             startFrame = clip.attribute( "startFrame" );
 
             if ( uuid.isEmpty() == true || startFrame.isEmpty() == true )
@@ -330,7 +334,8 @@ MainWorkflow::loadProject( const QDomElement &root )
             Clip* c = Library::getInstance()->clip( uuid );
             if ( c != NULL )
             {
-                addClip( new Clip( c ), trackId, startFrame.toLongLong(), type );
+                addClip( new Clip( c, begin.toLongLong(), end.toLongLong() ),
+                         trackId, startFrame.toLongLong(), type );
             }
             clip = clip.nextSibling().toElement();
         }
diff --git a/src/Workflow/TrackWorkflow.cpp b/src/Workflow/TrackWorkflow.cpp
index 040704c..f987b80 100644
--- a/src/Workflow/TrackWorkflow.cpp
+++ b/src/Workflow/TrackWorkflow.cpp
@@ -400,6 +400,8 @@ void    TrackWorkflow::save( QXmlStreamWriter& project ) const
         project.writeStartElement( "clip" );
         project.writeAttribute( "uuid", it.value()->getClip()->getParent()->fullId() );
         project.writeAttribute( "startFrame", QString::number( it.key() ) );
+        project.writeAttribute( "begin", QString::number( it.value()->getClip()->begin() ) );
+        project.writeAttribute( "end", QString::number( it.value()->getClip()->end() ) );
         project.writeEndElement();
     }
 }



More information about the Vlmc-devel mailing list