From 8cc50c843a771b4e2f0d716e4fa86cd600f7c0eb Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Sun, 15 Jun 2008 12:50:14 +0000 Subject: [PATCH] * lock mixer while loading project - fixes crashes when loading projects with FX-mixer settings * update BB-track-container after creating a new project - fixes non-existing TCOs (i.e. patterns) in BB-Editor in new projects git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1133 0778d3d1-df1d-0410-868b-ea421aaaa00d --- src/core/song.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/core/song.cpp b/src/core/song.cpp index ceb2510c7b..0252e61615 100644 --- a/src/core/song.cpp +++ b/src/core/song.cpp @@ -783,9 +783,12 @@ void song::createNewProject( void ) QCoreApplication::instance()->processEvents(); + m_loadingProject = FALSE; + + engine::getBBTrackContainer()->updateAfterTrackAdd(); + engine::getProjectJournal()->setJournalling( TRUE ); - m_loadingProject = FALSE; m_modified = FALSE; if( engine::getMainWindow() ) @@ -834,6 +837,8 @@ void song::loadProject( const QString & _file_name ) engine::getMainWindow()->resetWindowTitle(); } + engine::getMixer()->lock(); + // get the header information from the DOM m_tempoModel.loadSettings( mmp.head(), "bpm" ); m_timeSigModel.loadSettings( mmp.head(), "timesig" ); @@ -902,6 +907,8 @@ void song::loadProject( const QString & _file_name ) node = node.nextSibling(); } + engine::getMixer()->unlock(); + // Connect controller links to their controllers // now that everything is loaded controllerConnection::finalizeConnections();