mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-21 14:02:57 +02:00
Implement ReloadPreferences for SetPreferences Command.
This commit is contained in:
committed by
Paul Licameli
parent
1551a5a073
commit
99e18a8896
@@ -20,6 +20,7 @@ SetPreferenceCommand classes
|
||||
#include "../Prefs.h"
|
||||
#include "../ShuttleGui.h"
|
||||
#include "../commands/CommandContext.h"
|
||||
#include "../Project.h" // for "OnReloadPreferences".
|
||||
|
||||
bool GetPreferenceCommand::DefineParams( ShuttleParams & S ){
|
||||
S.Define( mName, wxT("Name"), wxT("") );
|
||||
@@ -68,11 +69,11 @@ void SetPreferenceCommand::PopulateOrExchange(ShuttleGui & S)
|
||||
S.EndMultiColumn();
|
||||
}
|
||||
|
||||
bool SetPreferenceCommand::Apply(const CommandContext & WXUNUSED(context))
|
||||
bool SetPreferenceCommand::Apply(const CommandContext & context)
|
||||
{
|
||||
bool bOK = gPrefs->Write(mName, mValue) && gPrefs->Flush();
|
||||
if( bOK && mbReload )
|
||||
bOK = bOK; // Not yet implemented.
|
||||
context.GetProject()->OnReloadPreferences( context );
|
||||
return bOK;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user