1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-21 08:27:13 +01:00

Reset session data directory on a Reset Configuration.

This commit is contained in:
James Crook
2020-06-03 13:28:47 +01:00
parent 9e3cb149f3
commit fb8214afc9

View File

@@ -375,10 +375,11 @@ struct Handler : CommandHandlerObject {
void OnResetConfig(const CommandContext &context) void OnResetConfig(const CommandContext &context)
{ {
auto &project = context.project; auto &project = context.project;
wxString dir = gPrefs->Read("/Directories/TempDir"); //wxString dir = gPrefs->Read("/Directories/TempDir");
gPrefs->DeleteAll(); gPrefs->DeleteAll();
// This stops ReloadPreferences warning about directory change
// on next restart. // Directory will be reset on next restart.
wxString dir = FileNames::DefaultTempDir();
gPrefs->Write("/Directories/TempDir", dir); gPrefs->Write("/Directories/TempDir", dir);
gPrefs->Write("/GUI/SyncLockTracks", 0); gPrefs->Write("/GUI/SyncLockTracks", 0);
gPrefs->Write("/SnapTo", 0 ); gPrefs->Write("/SnapTo", 0 );
@@ -390,7 +391,6 @@ void OnResetConfig(const CommandContext &context)
// - Reset Recording and Playback volumes // - Reset Recording and Playback volumes
// - Reset Selection formats (and for spectral too) // - Reset Selection formats (and for spectral too)
// - Reset Play-at-speed speed to x1 // - Reset Play-at-speed speed to x1
// - Reset Selected tool to cursor.
// - Stop playback/recording and unapply pause. // - Stop playback/recording and unapply pause.
// - Set Zoom sensibly. // - Set Zoom sensibly.
//ProjectSelectionManager::Get(project).AS_SetRate(44100.0); //ProjectSelectionManager::Get(project).AS_SetRate(44100.0);