mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Added "*" to !UpdateMeasure/!UpdateMeter to update all measures/meters forcibly
This commit is contained in:
parent
2b45f7301d
commit
411f53b1f9
@ -1212,13 +1212,19 @@ void CMeterWindow::MoveMeter(const std::wstring& name, int x, int y)
|
|||||||
void CMeterWindow::UpdateMeter(const std::wstring& name, bool group)
|
void CMeterWindow::UpdateMeter(const std::wstring& name, bool group)
|
||||||
{
|
{
|
||||||
const WCHAR* meter = name.c_str();
|
const WCHAR* meter = name.c_str();
|
||||||
|
bool all = false;
|
||||||
|
|
||||||
|
if (!group && meter[0] == L'*' && meter[1] == L'\0') // Allow [!UpdateMeter *]
|
||||||
|
{
|
||||||
|
all = true;
|
||||||
|
group = true;
|
||||||
|
}
|
||||||
|
|
||||||
bool bActiveTransition = false;
|
bool bActiveTransition = false;
|
||||||
bool bContinue = true;
|
bool bContinue = true;
|
||||||
std::vector<CMeter*>::const_iterator j = m_Meters.begin();
|
for (auto j = m_Meters.cbegin(); j != m_Meters.cend(); ++j)
|
||||||
for ( ; j != m_Meters.end(); ++j)
|
|
||||||
{
|
{
|
||||||
if (bContinue && CompareName((*j), meter, group))
|
if (all || (bContinue && CompareName((*j), meter, group)))
|
||||||
{
|
{
|
||||||
UpdateMeter((*j), bActiveTransition, true);
|
UpdateMeter((*j), bActiveTransition, true);
|
||||||
SetResizeWindowMode(RESIZEMODE_CHECK); // Need to recalculate the window size
|
SetResizeWindowMode(RESIZEMODE_CHECK); // Need to recalculate the window size
|
||||||
@ -1322,12 +1328,18 @@ void CMeterWindow::ToggleMeasure(const std::wstring& name, bool group)
|
|||||||
void CMeterWindow::UpdateMeasure(const std::wstring& name, bool group)
|
void CMeterWindow::UpdateMeasure(const std::wstring& name, bool group)
|
||||||
{
|
{
|
||||||
const WCHAR* measure = name.c_str();
|
const WCHAR* measure = name.c_str();
|
||||||
|
bool all = false;
|
||||||
|
|
||||||
|
if (!group && measure[0] == L'*' && measure[1] == L'\0') // Allow [!UpdateMeasure *]
|
||||||
|
{
|
||||||
|
all = true;
|
||||||
|
group = true;
|
||||||
|
}
|
||||||
|
|
||||||
bool bNetStats = m_HasNetMeasures;
|
bool bNetStats = m_HasNetMeasures;
|
||||||
std::vector<CMeasure*>::const_iterator i = m_Measures.begin();
|
for (auto i = m_Measures.cbegin(); i != m_Measures.cend(); ++i)
|
||||||
for ( ; i != m_Measures.end(); ++i)
|
|
||||||
{
|
{
|
||||||
if (CompareName((*i), measure, group))
|
if (all || CompareName((*i), measure, group))
|
||||||
{
|
{
|
||||||
if (bNetStats && (*i)->GetTypeID() == TypeID<CMeasureNet>())
|
if (bNetStats && (*i)->GetTypeID() == TypeID<CMeasureNet>())
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user