PianoRoll: reset last note volume/panning when clearing project

In order to get a uniform behaviour when starting with a new project or
opening another project, reset volume and panning of last edited note so
new placed notes have default volume and panning.

Closes #644.
This commit is contained in:
Tobias Doerffel
2014-04-30 10:48:40 +02:00
parent 5552fc110a
commit e9073c88bc
3 changed files with 17 additions and 0 deletions

View File

@@ -749,6 +749,11 @@ void song::clearProject()
engine::automationEditor()->setCurrentPattern( NULL );
}
if( engine::pianoRoll() )
{
engine::pianoRoll()->reset();
}
m_tempoModel.reset();
m_masterVolumeModel.reset();
m_masterPitchModel.reset();

View File

@@ -641,6 +641,15 @@ PianoRoll::PianoRoll() :
}
void PianoRoll::reset()
{
m_lastNoteVolume = DefaultVolume;
m_lastNotePanning = DefaultPanning;
}
void PianoRoll::changeNoteEditMode( int i )
{
m_noteEditMode = (noteEditMode) i;