1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-02 00:29:41 +02:00

Fix Show/Hide Tags Dialog, for export multiple by Labels.

Previously I only fixed the export by tracks case.
Oh beware, duplicated code.
This commit is contained in:
James Crook 2019-04-13 14:27:25 +01:00
parent 78cb554883
commit 5c361631c6

View File

@ -645,11 +645,11 @@ bool ExportMultiple::DirOk()
}
// TODO: JKC July2016: Merge labels/tracks duplicated export code.
// TODO: JKC Apr2019: Doubly so merge these! Too much duplication.
ProgressResult ExportMultiple::ExportMultipleByLabel(bool byName,
const wxString &prefix, bool addNumber)
{
wxASSERT(mProject);
bool tagsPrompt = mProject->GetShowId3Dialog();
int numFiles = mNumLabels;
int l = 0; // counter for files done
std::vector<ExportKit> exportSettings; // dynamic array for settings.
@ -739,8 +739,14 @@ ProgressResult ExportMultiple::ExportMultipleByLabel(bool byName,
setting.filetags.SetTag(TAG_TITLE, title);
setting.filetags.SetTag(TAG_TRACK, l+1);
// let the user have a crack at editing it, exit if cancelled
if( !setting.filetags.ShowEditDialog(mProject, _("Edit Metadata Tags"), tagsPrompt) )
return ProgressResult::Cancelled;
bool bShowTagsDialog = mProject->GetShowId3Dialog();
if( bShowTagsDialog ){
bool bCancelled = !setting.filetags.ShowEditDialog(mProject,_("Edit Metadata Tags"), bShowTagsDialog);
gPrefs->Read(wxT("/AudioFiles/ShowId3Dialog"), &bShowTagsDialog, true);
mProject->SetShowId3Dialog( bShowTagsDialog );
if( bCancelled )
return ProgressResult::Cancelled;
}
}
/* add the settings to the array of settings to be used for export */