1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-06 06:31:07 +01:00

Lower DoReloadPreferences into PrefsDialog.cpp

This commit is contained in:
Paul Licameli
2019-06-21 22:54:34 -04:00
parent 8db51416bc
commit b6077fd3cd
6 changed files with 44 additions and 44 deletions

View File

@@ -171,41 +171,6 @@ bool DoPasteNothingSelected(AudacityProject &project)
namespace EditActions {
// exported helper functions
void DoReloadPreferences( AudacityProject &project )
{
{
SpectrogramSettings::defaults().LoadPrefs();
WaveformSettings::defaults().LoadPrefs();
GlobalPrefsDialog dialog(&GetProjectFrame( project ) /* parent */ );
wxCommandEvent Evt;
//dialog.Show();
dialog.OnOK(Evt);
}
// LL: Moved from PrefsDialog since wxWidgets on OSX can't deal with
// rebuilding the menus while the PrefsDialog is still in the modal
// state.
for (auto p : AllProjects{}) {
MenuManager::Get(*p).RebuildMenuBar(*p);
// TODO: The comment below suggests this workaround is obsolete.
#if defined(__WXGTK__)
// Workaround for:
//
// http://bugzilla.audacityteam.org/show_bug.cgi?id=458
//
// This workaround should be removed when Audacity updates to wxWidgets
// 3.x which has a fix.
auto &window = GetProjectFrame( *p );
wxRect r = window.GetRect();
window.SetSize(wxSize(1,1));
window.SetSize(r.GetSize());
#endif
}
}
// Menu handler functions
struct Handler : CommandHandlerObject {