Tweak EQDefaultCurve update path

and add log message to aid testing.
This commit is contained in:
Steve Daulton 2016-03-21 11:44:48 +00:00
parent 437d6047c1
commit 3cab059038
1 changed files with 8 additions and 2 deletions

View File

@ -1479,13 +1479,19 @@ void EffectEqualization::UpdateDefaultCurves(bool updateAll /* false */)
EQCurveArray userCurves = mCurves;
mCurves.Clear();
wxFileName fn;
// We only wamt to look for the shipped EQDefaultCurves.xml
wxFileName fn = wxFileName(wxStandardPaths::Get().GetResourcesDir(),
wxT("EQDefaultCurves.xml"));
wxLogDebug(wxT("Attempting to load EQDefaultCurves.xml from %s"),wxStandardPaths::Get().GetResourcesDir().c_str());
XMLFileReader reader;
if(!GetDefaultFileName(fn) || !reader.Parse(this, fn.GetFullPath())) {
if(!reader.Parse(this, fn.GetFullPath())) {
wxLogError(wxT("EQDefaultCurves.xml could not be read."));
return;
}
else {
wxLogDebug(wxT("Loading EQDefaultCurves.xml successful."));
}
EQCurveArray defaultCurves = mCurves;
mCurves.Clear(); // clear now so that we can sort then add back.