[vlmc-devel] commit: ImportController: Fixing bug when loading a clip with childs ( Hugo Beauzee-Luyssen )

git at videolan.org git at videolan.org
Fri Mar 12 15:09:37 CET 2010


vlmc | branch: master | Hugo Beauzee-Luyssen <beauze.h at gmail.com> | Fri Mar 12 15:08:37 2010 +0100| [e78efa28996efcfa012627f9d4209833e8d6b253] | committer: Hugo Beauzee-Luyssen 

ImportController: Fixing bug when loading a clip with childs

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

 src/Gui/import/ImportController.cpp |    2 +-
 src/Library/MediaContainer.cpp      |    1 -
 src/Library/MediaContainer.h        |    3 ++-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Gui/import/ImportController.cpp b/src/Gui/import/ImportController.cpp
index f44ed94..df26aad 100644
--- a/src/Gui/import/ImportController.cpp
+++ b/src/Gui/import/ImportController.cpp
@@ -250,7 +250,7 @@ ImportController::accept()
     m_preview->stop();
     collapseAllButCurrentPath();
     foreach ( Clip* clip, m_temporaryMedias->clips().values() )
-        Library::getInstance()->addMedia( clip->getMedia() );
+        Library::getInstance()->addClip( clip );
     m_temporaryMedias->removeAll();
     m_clipRenderer->setClip( NULL );
     done( Accepted );
diff --git a/src/Library/MediaContainer.cpp b/src/Library/MediaContainer.cpp
index 2fcac30..2228971 100644
--- a/src/Library/MediaContainer.cpp
+++ b/src/Library/MediaContainer.cpp
@@ -119,7 +119,6 @@ MediaContainer::removeAll()
     while ( it != end )
     {
         emit clipRemoved( it.value() );
-        it.value()->clear();
         ++it;
     }
     m_clips.clear();
diff --git a/src/Library/MediaContainer.h b/src/Library/MediaContainer.h
index 2ecffa1..2308788 100644
--- a/src/Library/MediaContainer.h
+++ b/src/Library/MediaContainer.h
@@ -123,7 +123,8 @@ public slots:
      */
     void    clear();
     /**
-     *  \brief      Remove all the medias, but doesn't delete them.
+     *  \brief      Remove all the medias from the container, but doesn't clean nor
+     *              delete them.
      */
     void    removeAll();
 



More information about the Vlmc-devel mailing list