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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user