[vlmc-devel] commit: Timeline: Restore links between items when loading a project. ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Thu Apr 22 22:00:10 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Thu Apr 22 21:59:00 2010 +0200| [dceff7a96fb475d7086382e0aa88764269c9dd55] | committer: Hugo Beauzée-Luyssen 

Timeline: Restore links between items when loading a project.

Fixes #89

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

 src/Gui/timeline/Timeline.cpp |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/Gui/timeline/Timeline.cpp b/src/Gui/timeline/Timeline.cpp
index 5ec0af3..97ab1c7 100644
--- a/src/Gui/timeline/Timeline.cpp
+++ b/src/Gui/timeline/Timeline.cpp
@@ -227,6 +227,20 @@ Timeline::load( const QDomElement &root )
         {
             QString     color = elem.attribute( "color" );
             item->setColor( color );
+
+            QDomElement links = elem.firstChildElement( "linkedTo" );
+            if ( links.isNull() == false )
+            {
+                QDomElement linkedItem = links.firstChild().toElement();
+                while ( linkedItem.isNull() == false )
+                {
+                    QString     linkedUuid = linkedItem.attribute( "uuid" );
+                    AbstractGraphicsMediaItem   *li = tracksView()->item( linkedUuid );
+                    if ( li != NULL )
+                        item->group( li );
+                    linkedItem = linkedItem.nextSibling().toElement();
+                }
+            }
         }
         else
             qWarning() << "No such timeline item:" << uuid;



More information about the Vlmc-devel mailing list