1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-09-18 00:50:52 +02:00

Fix bug #599 where we didn't do something sensible when somebody has a corrupt .xml EQ file.

Also improve the error message so they can see which file is corrupt.
This commit is contained in:
martynshaw99 2012-11-26 00:15:39 +00:00
parent 8b6a9ca3d7
commit c8bc60eff4

View File

@ -1023,12 +1023,16 @@ void EqualizationDialog::LoadCurves(wxString fileName, bool append)
XMLFileReader reader;
if( !reader.Parse( this, fn.GetFullPath() ) )
{
// Inform user of load failure
wxMessageBox( reader.GetErrorStr(),
wxString msg;
/* i18n-hint: EQ stands for 'Equalization'.*/
_("Error Loading EQ Curve"),
msg.Printf(_("Error Loading EQ Curves from file:\n%s\nError message says:\n%s"), fn.GetFullPath(), reader.GetErrorStr());
// Inform user of load failure
wxMessageBox( msg,
_("Error Loading EQ Curves"),
wxOK | wxCENTRE,
this );
mCurves.Add( _("unnamed") ); // we always need a default curve to use
return;
}
if( mCurves.Last().Name != _("unnamed") )
mCurves.Add( _("unnamed") ); // we always need a default curve to use