mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
- SetOption: Fixed that new image isn't loaded if DynamicVariables=0.
- SetOption: Fixed that Rainmeter crashes if !SetOption is executed to Measure=Plugin. - Code cleanup and cosmetic changes.
This commit is contained in:
@ -33,7 +33,7 @@ using namespace Gdiplus;
|
||||
**
|
||||
*/
|
||||
CMeterImage::CMeterImage(CMeterWindow* meterWindow, const WCHAR* name) : CMeter(meterWindow, name),
|
||||
m_NeedsReload(false),
|
||||
m_NeedsRedraw(false),
|
||||
m_WidthDefined(false),
|
||||
m_HeightDefined(false),
|
||||
m_PreserveAspectRatio(false),
|
||||
@ -157,6 +157,13 @@ void CMeterImage::ReadConfig(CConfigParser& parser, const WCHAR* section)
|
||||
|
||||
// Read tinting configs
|
||||
m_Image.ReadConfig(parser, section);
|
||||
|
||||
if (m_Initialized &&
|
||||
!m_Measure && !m_DynamicVariables)
|
||||
{
|
||||
Initialize();
|
||||
m_NeedsRedraw = true;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -216,6 +223,11 @@ bool CMeterImage::Update()
|
||||
LoadImage(m_ImageNameResult, oldResult != m_ImageNameResult);
|
||||
return true;
|
||||
}
|
||||
else if (m_NeedsRedraw)
|
||||
{
|
||||
m_NeedsRedraw = false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user