diff --git a/include/TimeLineWidget.h b/include/TimeLineWidget.h index 0f9b1e23a..061a31081 100644 --- a/include/TimeLineWidget.h +++ b/include/TimeLineWidget.h @@ -121,6 +121,11 @@ public: return m_behaviourAtStop; } + void setBehaviourAtStop (int state) + { + emit loadBehaviourAtStop (state); + } + bool loopPointsEnabled() const { return m_loopPoints == LoopPointsEnabled; diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index 5f294d6e8..1dbbe1cf4 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -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