Save Piano Roll behaviour at stop state

This commit is contained in:
dev
2021-03-10 13:33:31 +05:30
committed by Kevin Zander
parent 1ddd204250
commit 192119621f
2 changed files with 9 additions and 0 deletions

View File

@@ -121,6 +121,11 @@ public:
return m_behaviourAtStop;
}
void setBehaviourAtStop (int state)
{
emit loadBehaviourAtStop (state);
}
bool loopPointsEnabled() const
{
return m_loopPoints == LoopPointsEnabled;

View File

@@ -5180,6 +5180,8 @@ void PianoRollWindow::saveSettings( QDomDocument & doc, QDomElement & de )
de.appendChild(markedSemiTonesRoot);
}
de.setAttribute("stopbehaviour", m_editor->m_timeLine->behaviourAtStop());
MainWindow::saveWidgetState( this, de );
}
@@ -5193,6 +5195,8 @@ void PianoRollWindow::loadSettings( const QDomElement & de )
MainWindow::restoreWidgetState( this, de );
m_editor->m_timeLine->setBehaviourAtStop(de.attribute("stopbehaviour").toInt());
// update margins here because we're later in the startup process
// We can't earlier because everything is still starting with the
// WHITE_KEY_WIDTH default