This commit is contained in:
Birunthan Mohanathas
2012-07-17 10:57:28 +03:00
parent 4bbc372116
commit 8309eb2bda
4 changed files with 26 additions and 62 deletions

View File

@ -152,30 +152,17 @@ bool CMeterImage::Update()
if (!m_Measures.empty()) // read from the measures
{
std::wstring val = m_Measures[0]->GetStringValue(AUTOSCALE_OFF, 1, 0, false);
if (m_ImageName.empty())
{
m_ImageNameResult = val;
m_ImageNameResult = m_Measures[0]->GetStringValue(AUTOSCALE_OFF, 1, 0, false);
}
else
{
std::vector<std::wstring> stringValues;
stringValues.push_back(val);
// Get the values for the other measures
std::vector<CMeasure*>::const_iterator iter = m_Measures.begin();
for ( ; iter != m_Measures.end(); ++iter)
{
stringValues.push_back((*iter)->GetStringValue(AUTOSCALE_OFF, 1, 0, false));
}
m_ImageNameResult = m_ImageName;
if (!ReplaceMeasures(stringValues, m_ImageNameResult))
if (!ReplaceMeasures(m_ImageNameResult))
{
// ImageName doesn't contain any measures, so use the result of MeasureName.
m_ImageNameResult = val;
m_ImageNameResult = m_Measures[0]->GetStringValue(AUTOSCALE_OFF, 1, 0, false);
}
}
}