mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed issue that ImageName is ignored if MeasureName is set
http://rainmeter.net/forum/viewtopic.php?p=88820
Reverted this part: 136689bcfb (L4L167)
This commit is contained in:
parent
7c76cf8b2d
commit
4a625d0c2f
@ -159,27 +159,29 @@ bool MeterImage::Update()
|
|||||||
{
|
{
|
||||||
if (!m_Measures.empty() || m_DynamicVariables)
|
if (!m_Measures.empty() || m_DynamicVariables)
|
||||||
{
|
{
|
||||||
|
static std::wstring s_ImageNameResult;
|
||||||
|
|
||||||
// Store the current values so we know if the image needs to be updated
|
// Store the current values so we know if the image needs to be updated
|
||||||
std::wstring oldResult = m_ImageName;
|
std::wstring oldResult = s_ImageNameResult;
|
||||||
|
|
||||||
if (!m_Measures.empty()) // read from the measures
|
if (!m_Measures.empty()) // read from the measures
|
||||||
{
|
{
|
||||||
if (m_ImageName.empty())
|
if (m_ImageName.empty())
|
||||||
{
|
{
|
||||||
m_ImageName = m_Measures[0]->GetStringOrFormattedValue(AUTOSCALE_OFF, 1, 0, false);
|
s_ImageNameResult = m_Measures[0]->GetStringOrFormattedValue(AUTOSCALE_OFF, 1, 0, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_ImageName = m_ImageName;
|
s_ImageNameResult = m_ImageName;
|
||||||
if (!ReplaceMeasures(m_ImageName, AUTOSCALE_OFF))
|
if (!ReplaceMeasures(s_ImageNameResult, AUTOSCALE_OFF))
|
||||||
{
|
{
|
||||||
// ImageName doesn't contain any measures, so use the result of MeasureName.
|
// ImageName doesn't contain any measures, so use the result of MeasureName.
|
||||||
m_ImageName = m_Measures[0]->GetStringOrFormattedValue(AUTOSCALE_OFF, 1, 0, false);
|
s_ImageNameResult = m_Measures[0]->GetStringOrFormattedValue(AUTOSCALE_OFF, 1, 0, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadImage(m_ImageName, (wcscmp(oldResult.c_str(), m_ImageName.c_str()) != 0));
|
LoadImage(s_ImageNameResult, (wcscmp(oldResult.c_str(), s_ImageNameResult.c_str()) != 0));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (m_NeedsRedraw)
|
else if (m_NeedsRedraw)
|
||||||
|
Loading…
Reference in New Issue
Block a user