mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed that meters were initialized before measures
This commit is contained in:
@ -92,7 +92,7 @@ void CMeter::Initialize()
|
||||
|
||||
if (!m_RelativeMeter)
|
||||
{
|
||||
const std::list<CMeter*>& meters = m_MeterWindow->GetMeters();
|
||||
const std::vector<CMeter*>& meters = m_MeterWindow->GetMeters();
|
||||
for (auto iter = meters.cbegin(); iter != meters.cend(); ++iter)
|
||||
{
|
||||
if (*iter == this)
|
||||
@ -251,6 +251,11 @@ void CMeter::ReadOptions(CConfigParser& parser, const WCHAR* section)
|
||||
parser.SetStyleTemplate(style);
|
||||
}
|
||||
|
||||
if (!m_Initialized)
|
||||
{
|
||||
BindMeasures(parser, section);
|
||||
}
|
||||
|
||||
int oldX = m_X;
|
||||
std::wstring& x = (std::wstring&)parser.ReadString(section, L"X", L"0");
|
||||
if (!x.empty())
|
||||
@ -455,12 +460,6 @@ bool CMeter::Update()
|
||||
*/
|
||||
bool CMeter::BindPrimaryMeasure(CConfigParser& parser, const WCHAR* section, bool optional)
|
||||
{
|
||||
const std::wstring& style = parser.ReadString(section, L"MeterStyle", L"");
|
||||
if (!style.empty())
|
||||
{
|
||||
parser.SetStyleTemplate(style);
|
||||
}
|
||||
|
||||
const std::wstring& measureName = parser.ReadString(section, L"MeasureName", L"");
|
||||
|
||||
// The meter is not bound to anything
|
||||
|
Reference in New Issue
Block a user