mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-26 07:13:49 +01:00
Remove flushing of preferences in ShuttlePrefs and only
flush when all settings have been written.
This commit is contained in:
@@ -347,7 +347,6 @@ bool DevicePrefs::Apply()
|
||||
}
|
||||
if (map) {
|
||||
gPrefs->Write(wxT("/AudioIO/PlaybackDevice"), map->deviceString);
|
||||
gPrefs->Flush();
|
||||
}
|
||||
|
||||
map = NULL;
|
||||
@@ -368,7 +367,6 @@ bool DevicePrefs::Apply()
|
||||
}
|
||||
gPrefs->Write(wxT("/AudioIO/RecordChannels"),
|
||||
mChannels->GetSelection() + 1);
|
||||
return gPrefs->Flush();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -407,6 +407,8 @@ void PrefsDialog::OnOK(wxCommandEvent & WXUNUSED(event))
|
||||
else
|
||||
mUniquePage->Apply();
|
||||
|
||||
gPrefs->Flush();
|
||||
|
||||
SavePreferredPage();
|
||||
|
||||
#if USE_PORTMIXER
|
||||
@@ -443,7 +445,6 @@ void PrefsDialog::OnOK(wxCommandEvent & WXUNUSED(event))
|
||||
|
||||
WaveformSettings::defaults().LoadPrefs();
|
||||
|
||||
gPrefs->Flush();
|
||||
EndModal(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -189,7 +189,6 @@ bool RecordingPrefs::Apply()
|
||||
if (targetpeak + deltapeak > 100.0 || targetpeak - deltapeak < 0.0)
|
||||
{
|
||||
gPrefs->Write(wxT("/AudioIO/DeltaPeakVolume"), min(100.0 - targetpeak, targetpeak));
|
||||
gPrefs->Flush();
|
||||
}
|
||||
|
||||
int value;
|
||||
@@ -201,7 +200,7 @@ bool RecordingPrefs::Apply()
|
||||
if (value < 0)
|
||||
gPrefs->Write(wxT("/AudioIO/NumberAnalysis"), AILA_DEF_NUMBER_ANALYSIS);
|
||||
#endif
|
||||
return gPrefs->Flush();
|
||||
return true;
|
||||
}
|
||||
|
||||
PrefsPanel *RecordingPrefsFactory::Create(wxWindow *parent)
|
||||
|
||||
Reference in New Issue
Block a user