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.
(cherry picked from commit 2614474246)
This commit is contained in:
Tobias Doerffel
2010-08-16 20:28:53 +02:00
parent 54ce5b96f6
commit 9cf0f4932a

View File

@@ -749,6 +749,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();