mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-10 08:33:36 +02:00
Fewer includes of WaveformSettings.h, SpectrogramSettings.h...
... See ultimate origin of some of the deleted lines at 4724c6a
Whatever change it is that needs loading by LoadPrefs -- do it instead right
after any possibility of changes to the relevant preferences, in the Commit()
functions of SpectrumPrefs and WaveforPrefs
This commit is contained in:
@@ -22,8 +22,6 @@
|
||||
#include "../commands/ScreenshotCommand.h"
|
||||
#include "../export/Export.h"
|
||||
#include "../prefs/PrefsDialog.h"
|
||||
#include "../prefs/SpectrogramSettings.h"
|
||||
#include "../prefs/WaveformSettings.h"
|
||||
#include "../tracks/labeltrack/ui/LabelTrackView.h"
|
||||
#include "../widgets/AudacityMessageBox.h"
|
||||
|
||||
|
@@ -62,7 +62,6 @@
|
||||
#include "TracksBehaviorsPrefs.h"
|
||||
#include "WarningsPrefs.h"
|
||||
// #include "WaveformPrefs.h"
|
||||
#include "WaveformSettings.h"
|
||||
#include "ExtImportPrefs.h"
|
||||
|
||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||
@@ -857,9 +856,6 @@ void PrefsDialog::OnOK(wxCommandEvent & WXUNUSED(event))
|
||||
|
||||
wxTheApp->AddPendingEvent(wxCommandEvent{ EVT_PREFS_UPDATE });
|
||||
|
||||
WaveformSettings::defaults().LoadPrefs();
|
||||
SpectrogramSettings::defaults().LoadPrefs();
|
||||
|
||||
if( IsModal() )
|
||||
EndModal(true);
|
||||
else
|
||||
@@ -949,9 +945,6 @@ wxString PrefsPanel::HelpPageName()
|
||||
void DoReloadPreferences( AudacityProject &project )
|
||||
{
|
||||
{
|
||||
SpectrogramSettings::defaults().LoadPrefs();
|
||||
WaveformSettings::defaults().LoadPrefs();
|
||||
|
||||
GlobalPrefsDialog dialog(
|
||||
&GetProjectFrame( project ) /* parent */, &project );
|
||||
wxCommandEvent Evt;
|
||||
|
@@ -501,10 +501,11 @@ bool SpectrumPrefs::Commit()
|
||||
|
||||
mCommitted = true;
|
||||
SpectrogramSettings::Globals::Get().SavePrefs(); // always
|
||||
SpectrogramSettings *const pSettings = &SpectrogramSettings::defaults();
|
||||
if (!mWt || mDefaulted) {
|
||||
SpectrogramSettings *const pSettings = &SpectrogramSettings::defaults();
|
||||
pSettings->SavePrefs();
|
||||
}
|
||||
pSettings->LoadPrefs(); // always; in case Globals changed
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@@ -177,12 +177,12 @@ bool WaveformPrefs::Commit()
|
||||
}
|
||||
}
|
||||
|
||||
WaveformSettings *const pSettings = &WaveformSettings::defaults();
|
||||
if (!mWt || mDefaulted) {
|
||||
WaveformSettings *const pSettings =
|
||||
&WaveformSettings::defaults();
|
||||
*pSettings = mTempSettings;
|
||||
pSettings->SavePrefs();
|
||||
}
|
||||
pSettings->LoadPrefs(); // always; in case Globals changed
|
||||
|
||||
mTempSettings.ConvertToEnumeratedDBRange();
|
||||
|
||||
|
Reference in New Issue
Block a user