diff --git a/include/Song.h b/include/Song.h index 05ed0bdf477..70df7946555 100644 --- a/include/Song.h +++ b/include/Song.h @@ -69,7 +69,11 @@ class LMMS_EXPORT Song : public TrackContainer /** * Should we discard MIDI ControllerConnections from project files? */ - BoolModel discardMIDIConnections; + BoolModel discardMIDIConnections{false}; + + void setDefaultOptions() { + discardMIDIConnections.setValue(false); + } }; void clearErrors(); diff --git a/src/core/Song.cpp b/src/core/Song.cpp index 2809c61adb1..aa7aef66f17 100644 --- a/src/core/Song.cpp +++ b/src/core/Song.cpp @@ -1265,7 +1265,11 @@ bool Song::guiSaveProjectAs( const QString & _file_name ) m_oldFileName = m_fileName; setProjectFileName(_file_name); - if(!guiSaveProject()) + bool saveResult = guiSaveProject(); + // After saving as, restore default save options. + m_saveOptions.setDefaultOptions(); + + if(saveResult) { // Saving failed. Restore old filenames. setProjectFileName(m_oldFileName); diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 424c23d26e6..5d1dbf66673 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -922,7 +922,8 @@ bool MainWindow::saveProject() bool MainWindow::saveProjectAs() { - VersionedSaveDialog sfd( this, tr( "Save Project" ), "", + auto optionsWidget = new SaveOptionsWidget(Engine::getSong()->getSaveOptions()); + VersionedSaveDialog sfd( this, optionsWidget, tr( "Save Project" ), "", tr( "LMMS Project" ) + " (*.mmpz *.mmp);;" + tr( "LMMS Project Template" ) + " (*.mpt)" ); QString f = Engine::getSong()->projectFileName();