1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-21 08:27:13 +01: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:
Paul Licameli
2018-02-17 17:42:14 -05:00
parent cc635e0498
commit 62899a32f4
37 changed files with 198 additions and 136 deletions

View File

@@ -10,6 +10,7 @@
#include "../TrackPanel.h"
#include "../commands/CommandContext.h"
#include "../commands/CommandManager.h"
#include "../prefs/GUIPrefs.h"
#include "../prefs/TracksPrefs.h"
#ifdef EXPERIMENTAL_EFFECTS_RACK
@@ -367,7 +368,10 @@ void OnShowClipping(const CommandContext &context)
gPrefs->Write(wxT("/GUI/ShowClipping"), checked);
gPrefs->Flush();
commandManager->Check(wxT("ShowClipping"), checked);
trackPanel->UpdatePrefs();
wxTheApp->AddPendingEvent(wxCommandEvent{
EVT_PREFS_UPDATE, ShowClippingPrefsID() });
trackPanel->Refresh(false);
}