mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4538 Skip Save project at exit when no data has changed
Guard changes in preferences and reset change detector when project is closed
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "RiuPropertyViewTabWidget.h"
|
||||
|
||||
#include "cafPdmSettings.h"
|
||||
#include "cafPdmUiModelChangeDetector.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
@@ -65,6 +66,13 @@ void RicEditPreferencesFeature::onActionTriggered(bool isChecked)
|
||||
caf::PdmSettings::readFieldsFromApplicationStore(app->preferences());
|
||||
app->preferences()->initAfterReadRecursively();
|
||||
}
|
||||
|
||||
if (!app->isProjectSavedToDisc())
|
||||
{
|
||||
// Always reset change detector when modifying preferences, as these changes are irrelevant
|
||||
// when the project we work on is not saved to disc
|
||||
caf::PdmUiModelChangeDetector::instance()->reset();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user