mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-25 07:43:54 +02:00
All things with an UpdatePrefs() message listen for an event...
... Still to do, improve the handling of updates of only subsets of the prefs
This commit is contained in:
@@ -366,6 +366,12 @@ wxString GUIPrefs::GetLang()
|
||||
return {};
|
||||
}
|
||||
|
||||
int ShowClippingPrefsID()
|
||||
{
|
||||
static int value = wxNewId();
|
||||
return value;
|
||||
}
|
||||
|
||||
PrefsPanel::Factory
|
||||
GUIPrefsFactory = [](wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
|
||||
@@ -67,4 +67,7 @@ class GUIPrefs final : public PrefsPanel
|
||||
|
||||
/// A PrefsPanel::Factory that creates one GUIPrefs panel.
|
||||
extern PrefsPanel::Factory GUIPrefsFactory;
|
||||
|
||||
int ShowClippingPrefsID();
|
||||
|
||||
#endif
|
||||
|
||||
@@ -850,9 +850,6 @@ void PrefsDialog::OnOK(wxCommandEvent & WXUNUSED(event))
|
||||
// LL: wxMac can't handle recreating the menus when this dialog is still active,
|
||||
// so AudacityProject::UpdatePrefs() or any of the routines it calls must
|
||||
// not cause MenuCreator::RebuildMenuBar() to be executed.
|
||||
for (size_t i = 0; i < gAudacityProjects.size(); i++) {
|
||||
gAudacityProjects[i]->UpdatePrefs();
|
||||
}
|
||||
|
||||
wxTheApp->AddPendingEvent(wxCommandEvent{ EVT_PREFS_UPDATE });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user