mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Tweaks
This commit is contained in:
parent
4dbf7932ab
commit
ffbdcbf65a
@ -89,24 +89,6 @@ CMeter::~CMeter()
|
||||
void CMeter::Initialize()
|
||||
{
|
||||
m_Initialized = true;
|
||||
|
||||
if (!m_RelativeMeter)
|
||||
{
|
||||
const std::vector<CMeter*>& meters = m_MeterWindow->GetMeters();
|
||||
for (auto iter = meters.cbegin(); iter != meters.cend(); ++iter)
|
||||
{
|
||||
if (*iter == this)
|
||||
{
|
||||
if (iter != meters.begin())
|
||||
{
|
||||
--iter;
|
||||
m_RelativeMeter = (*iter);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -60,6 +60,8 @@ public:
|
||||
void SetX(int x);
|
||||
void SetY(int y);
|
||||
|
||||
void SetRelativeMeter(CMeter* meter) { m_RelativeMeter = meter; }
|
||||
|
||||
const CMouse& GetMouse() { return m_Mouse; }
|
||||
bool HasMouseAction() { return m_HasMouseAction; }
|
||||
|
||||
|
@ -2175,7 +2175,7 @@ bool CMeterWindow::ReadSkin()
|
||||
}
|
||||
|
||||
// Initialize measures. This is a separate loop to avoid errors caused by
|
||||
// referencing not-yet-existent [measures] referencing in the options.
|
||||
// referencing not-yet-existent [measures] in the options.
|
||||
for (auto iter = measures.cbegin(); iter != measures.cend(); ++iter)
|
||||
{
|
||||
CMeasure* measure = *iter;
|
||||
@ -2185,6 +2185,7 @@ bool CMeterWindow::ReadSkin()
|
||||
|
||||
// Initialize meters.
|
||||
m_Meters.reserve(meters.size());
|
||||
CMeter* prevMeter = NULL;
|
||||
for (auto iter = meters.cbegin(); iter != meters.cend(); ++iter)
|
||||
{
|
||||
CMeter* meter = *iter;
|
||||
@ -2192,6 +2193,7 @@ bool CMeterWindow::ReadSkin()
|
||||
|
||||
meter->ReadOptions(m_Parser);
|
||||
meter->Initialize();
|
||||
meter->SetRelativeMeter(prevMeter);
|
||||
|
||||
if (!meter->GetToolTipText().empty())
|
||||
{
|
||||
@ -2202,6 +2204,8 @@ bool CMeterWindow::ReadSkin()
|
||||
{
|
||||
m_HasButtons = true;
|
||||
}
|
||||
|
||||
prevMeter = meter;
|
||||
}
|
||||
|
||||
if (m_Meters.empty())
|
||||
|
Loading…
Reference in New Issue
Block a user