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:
@@ -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();
|
||||
|
||||
@@ -641,6 +641,15 @@ PianoRoll::PianoRoll() :
|
||||
}
|
||||
|
||||
|
||||
|
||||
void PianoRoll::reset()
|
||||
{
|
||||
m_lastNoteVolume = DefaultVolume;
|
||||
m_lastNotePanning = DefaultPanning;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void PianoRoll::changeNoteEditMode( int i )
|
||||
{
|
||||
m_noteEditMode = (noteEditMode) i;
|
||||
|
||||
Reference in New Issue
Block a user