Prevent settings from being saved to setreg files on editor close. Limiting this to avoid a bigger blast radius. (#5717)

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
This commit is contained in:
Danilo Aimini
2021-11-17 13:27:57 -08:00
committed by GitHub
parent 713a3916f5
commit a8dcfbbb13
3 changed files with 8 additions and 6 deletions
+6 -4
View File
@@ -473,7 +473,7 @@ void SEditorSettings::LoadValue(const char* sSection, const char* sKey, ESystemC
}
//////////////////////////////////////////////////////////////////////////
void SEditorSettings::Save()
void SEditorSettings::Save(bool isEditorClosing)
{
QString strStringPlaceholder;
@@ -640,14 +640,16 @@ void SEditorSettings::Save()
// --- Settings Registry values
// Prefab System UI
AzFramework::ApplicationRequests::Bus::Broadcast(
&AzFramework::ApplicationRequests::SetPrefabSystemEnabled, prefabSystem);
AzFramework::ApplicationRequests::Bus::Broadcast(&AzFramework::ApplicationRequests::SetPrefabSystemEnabled, prefabSystem);
AzToolsFramework::Prefab::PrefabLoaderInterface* prefabLoaderInterface =
AZ::Interface<AzToolsFramework::Prefab::PrefabLoaderInterface>::Get();
prefabLoaderInterface->SetSaveAllPrefabsPreference(levelSaveSettings.saveAllPrefabsPreference);
SaveSettingsRegistryFile();
if (!isEditorClosing)
{
SaveSettingsRegistryFile();
}
}
//////////////////////////////////////////////////////////////////////////