Song: reset global models in clearProject()

We have to reset global models such as tempo, master volume etc. before
clearing the global automation patterns attached to them. Fixes bug with
persistent automation on these controls when clearing project.

Closes #3046039.
This commit is contained in:
Tobias Doerffel
2010-08-16 20:28:53 +02:00
parent 23a3efcac0
commit 2614474246

View File

@@ -757,6 +757,11 @@ void song::clearProject()
engine::automationEditor()->setCurrentPattern( NULL );
}
m_tempoModel.reset();
m_masterVolumeModel.reset();
m_masterPitchModel.reset();
m_timeSigModel.reset();
AutomationPattern::globalAutomationPattern( &m_tempoModel )->clear();
AutomationPattern::globalAutomationPattern( &m_masterVolumeModel )->
clear();