[vlmc-devel] commit: ProjectManager: Set the new workspace when saving a project as. ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Mon Jun 28 21:57:19 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Mon Jun 28 21:57:02 2010 +0200| [951d74eaf087268af47fbd878ba93f0195b0d5e2] | committer: Hugo Beauzée-Luyssen 

ProjectManager: Set the new workspace when saving a project as.

This avoid don't copying the medias to the new workspace.

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

 src/Gui/project/GuiProjectManager.cpp |    4 ++++
 src/Project/Workspace.cpp             |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/Gui/project/GuiProjectManager.cpp b/src/Gui/project/GuiProjectManager.cpp
index 5096127..71da4c8 100644
--- a/src/Gui/project/GuiProjectManager.cpp
+++ b/src/Gui/project/GuiProjectManager.cpp
@@ -142,6 +142,10 @@ GUIProjectManager::createNewProjectFile( bool saveAs )
         if ( outputFileName.endsWith( ".vlmc" ) == false )
             outputFileName += ".vlmc";
         m_projectFile = new QFile( outputFileName );
+        QFileInfo       fInfo( outputFileName );
+        SettingsManager::getInstance()->setValue( "general/Workspace",
+                                                  fInfo.absolutePath(), SettingsManager::Project);
+
         appendToRecentProject( outputFileName );
         if ( relocate == true )
             Workspace::getInstance()->copyAllToWorkspace();
diff --git a/src/Project/Workspace.cpp b/src/Project/Workspace.cpp
index d7c1043..1f839fb 100644
--- a/src/Project/Workspace.cpp
+++ b/src/Project/Workspace.cpp
@@ -177,6 +177,7 @@ Workspace::copyAllToWorkspace()
         QMutexLocker    lock( m_mediasToCopyMutex );
         while ( it != ite )
         {
+            qDebug() << "Enqueuing:" << it.value()->getMedia();
             m_mediasToCopy.enqueue( it.value()->getMedia() );
             ++it;
         }



More information about the Vlmc-devel mailing list