mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-13 22:21:11 +02:00
Apparently, wxConfigBase::Write() does not update values for next access on all platforms unless Flush() method is called. Added many calls to wxConfigBase::Flush() to make sure the Rad() calls get the right values.
This commit is contained in:
@@ -280,6 +280,7 @@ void Importer::WriteImportItems()
|
||||
}
|
||||
name.Printf (wxT("/ExtImportItems/Item%d"), i);
|
||||
gPrefs->Write (name, val);
|
||||
gPrefs->Flush();
|
||||
}
|
||||
/* If we used to have more items than we have now, delete the excess items.
|
||||
We just keep deleting items and incrementing until we find there aren't any
|
||||
|
@@ -313,6 +313,7 @@ ImportFileHandle *FFmpegImportPlugin::Open(wxString filename)
|
||||
if (dontShowDlg == 0 && newsession)
|
||||
{
|
||||
gPrefs->Write(wxT("/NewImportingSession"), false);
|
||||
gPrefs->Flush();
|
||||
dlg = new FFmpegNotFoundDialog(NULL);
|
||||
dlg->ShowModal();
|
||||
delete dlg;
|
||||
|
@@ -229,6 +229,7 @@ static wxString AskCopyOrEdit()
|
||||
oldCopyPref = wxT("copy");
|
||||
}
|
||||
gPrefs->Write(wxT("/Warnings/CopyOrEditUncompressedDataFirstAsk"), (long) false);
|
||||
gPrefs->Flush();
|
||||
}
|
||||
|
||||
// check the current preferences for whether or not we should ask the user about this.
|
||||
@@ -284,6 +285,7 @@ How do you want to import the current file(s)?"), oldCopyPref == wxT("copy") ? _
|
||||
}
|
||||
if (dontAskNextTimeBox->IsChecked()) {
|
||||
gPrefs->Write(wxT("/Warnings/CopyOrEditUncompressedDataAsk"), (long) false);
|
||||
gPrefs->Flush();
|
||||
}
|
||||
} else {
|
||||
return wxT("cancel");
|
||||
@@ -292,6 +294,7 @@ How do you want to import the current file(s)?"), oldCopyPref == wxT("copy") ? _
|
||||
// if the preference changed, save it.
|
||||
if (newCopyPref != oldCopyPref) {
|
||||
gPrefs->Write(wxT("/FileFormats/CopyOrEditUncompressedData"), newCopyPref);
|
||||
gPrefs->Flush();
|
||||
}
|
||||
oldCopyPref = newCopyPref;
|
||||
}
|
||||
|
Reference in New Issue
Block a user