1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-16 08:34:10 +02:00

Fix for P1 bug #850

This ensures that the settings file gets flushed after the presets
are removed so it won't happen during termination.
This commit is contained in:
lllucius@gmail.com 2015-02-02 15:40:15 +00:00
parent 2e562600af
commit 5826525970

View File

@ -1246,12 +1246,20 @@ bool PluginManager::SetSharedConfig(const PluginID & ID, const wxString & group,
bool PluginManager::RemoveSharedConfigSubgroup(const PluginID & ID, const wxString & group)
{
return GetSettings()->DeleteGroup(SharedGroup(ID, group));
bool result = GetSettings()->DeleteGroup(SharedGroup(ID, group));
if (result)
{
GetSettings()->Flush();
}
}
bool PluginManager::RemoveSharedConfig(const PluginID & ID, const wxString & group, const wxString & key)
{
return GetSettings()->DeleteEntry(SharedKey(ID, group, key));
bool result = GetSettings()->DeleteEntry(SharedKey(ID, group, key));
if (result)
{
GetSettings()->Flush();
}
}
bool PluginManager::GetPrivateConfigSubgroups(const PluginID & ID, const wxString & group, wxArrayString & subgroups)
@ -1321,12 +1329,20 @@ bool PluginManager::SetPrivateConfig(const PluginID & ID, const wxString & group
bool PluginManager::RemovePrivateConfigSubgroup(const PluginID & ID, const wxString & group)
{
return GetSettings()->DeleteGroup(PrivateGroup(ID, group));
bool result = GetSettings()->DeleteGroup(PrivateGroup(ID, group));
if (result)
{
GetSettings()->Flush();
}
}
bool PluginManager::RemovePrivateConfig(const PluginID & ID, const wxString & group, const wxString & key)
{
return GetSettings()->DeleteEntry(PrivateKey(ID, group, key));
bool result = GetSettings()->DeleteEntry(PrivateKey(ID, group, key));
if (result)
{
GetSettings()->Flush();
}
}
// ============================================================================