Got rid of the "Not a meter or measure" error.

The handling of the MeterStyle is now done in the CConfigParser.
This commit is contained in:
Kimmo Pekkola
2009-09-04 17:40:02 +00:00
parent 4274397806
commit 8eccc8ddec
5 changed files with 18 additions and 8 deletions

View File

@ -149,7 +149,15 @@ const std::wstring& CConfigParser::ReadString(LPCTSTR section, LPCTSTR key, LPCT
defValue = L"";
}
result = GetValue(section, key, defValue);
std::wstring strDefault = defValue;
// If the template is defined read the value first from there.
if (!m_StyleTemplate.empty())
{
strDefault = GetValue(m_StyleTemplate, key, strDefault);
}
result = GetValue(section, key, strDefault);
if (result == defValue)
{
return result;