MCPcopy Create free account
hub / github.com/audacity/audacity / LoadSettingsFromString

Method LoadSettingsFromString

src/commands/AudacityCommand.cpp:131–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131bool AudacityCommand::LoadSettingsFromString(const wxString & parms)
132{
133 wxString preset = parms;
134
135 CommandParameters eap(parms);
136 ShuttleSetAutomation S;
137
138 S.SetForWriting( &eap );
139 bool bResult = VisitSettings( S );
140 wxASSERT_MSG( bResult, "You did not define DefineParameters() for this command" );
141 static_cast<void>(bResult); // fix unused variable warning in release mode
142 if (!S.bOK)
143 {
144 AudacityCommand::MessageBox(
145 XO(
146"%s: Could not load settings below. Default settings will be used.\n\n%s")
147 .Format( GetName(), preset ) );
148
149 // fror now always succeed, so that we can prompt the user.
150 return true;
151 }
152
153 return TransferDataToWindow();
154}
155
156bool AudacityCommand::DoAudacityCommand(
157 const CommandContext& context, bool shouldPrompt /* = true */)

Callers 2

SetEffectParametersMethod · 0.45
ImportPresetsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected