fixed bug that dynamic viewelemnts in main menu were not drawn if menu was closed and opened again

This commit is contained in:
louis 2016-03-31 16:58:24 +02:00
parent 3cc3c03f7d
commit 5c39376723
4 changed files with 26 additions and 0 deletions

View File

@ -1084,6 +1084,7 @@ cViewMenuMain::~cViewMenuMain() {
void cViewMenuMain::ClearVariables(void) {
init = true;
lastDrawDynamic = 0;
}
void cViewMenuMain::SetViewElements(void) {

View File

@ -205,6 +205,7 @@ void cVeDevices::Init(void) {
void cVeDevices::Close(void) {
devices.clear();
initial = true;
lastRefresh = 0;
numDevices = 0;
mutexDevices.Lock();
delete[] lastSignalStrength;

View File

@ -630,6 +630,11 @@ cVeDmSystemload::cVeDmSystemload(void) {
cVeDmSystemload::~cVeDmSystemload(void) {
}
void cVeDmSystemload::Close(void) {
Reset();
cViewElement::Close();
}
void cVeDmSystemload::SetTokenContainer(void) {
tokenContainer = new skindesignerapi::cTokenContainer();
tokenContainer->DefineStringToken("{load}", (int)eDMSystemloadST::load);
@ -684,6 +689,11 @@ cVeDmSystemmemory::cVeDmSystemmemory(void) {
cVeDmSystemmemory::~cVeDmSystemmemory(void) {
}
void cVeDmSystemmemory::Close(void) {
Reset();
cViewElement::Close();
}
void cVeDmSystemmemory::SetTokenContainer(void) {
tokenContainer = new skindesignerapi::cTokenContainer();
tokenContainer->DefineIntToken("{totalmem}", (int)eDMSystemmemoryIT::totalmem);
@ -730,6 +740,11 @@ cVeDmTemperatures::cVeDmTemperatures(void) {
cVeDmTemperatures::~cVeDmTemperatures(void) {
}
void cVeDmTemperatures::Close(void) {
Reset();
cViewElement::Close();
}
void cVeDmTemperatures::SetTokenContainer(void) {
tokenContainer = new skindesignerapi::cTokenContainer();
tokenContainer->DefineIntToken("{cputemp}", (int)eDMTemperaturesIT::cputemp);
@ -795,6 +810,11 @@ cVeDmVdrstatistics::cVeDmVdrstatistics(void) {
cVeDmVdrstatistics::~cVeDmVdrstatistics(void) {
}
void cVeDmVdrstatistics::Close(void) {
Reset();
cViewElement::Close();
}
void cVeDmVdrstatistics::SetTokenContainer(void) {
tokenContainer = new skindesignerapi::cTokenContainer();
tokenContainer->DefineStringToken("{vdrcpu}", (int)eDMVdrstatisticsST::vdrcpu);

View File

@ -125,6 +125,7 @@ private:
public:
cVeDmSystemload(void);
virtual ~cVeDmSystemload(void);
void Close(void);
void Reset(void) { lastSystemLoad = -1.0f; }
void SetTokenContainer(void);
bool Parse(bool forced = false);
@ -139,6 +140,7 @@ private:
public:
cVeDmSystemmemory(void);
virtual ~cVeDmSystemmemory(void);
void Close(void);
void Reset(void) { lastMemUsage = -1; }
void SetTokenContainer(void);
bool Parse(bool forced = false);
@ -154,6 +156,7 @@ private:
public:
cVeDmTemperatures(void);
virtual ~cVeDmTemperatures(void);
void Close(void);
void Reset(void) { lastCpuTemp = -1; lastGpuTemp = -1; }
void SetTokenContainer(void);
bool Parse(bool forced = false);
@ -169,6 +172,7 @@ private:
public:
cVeDmVdrstatistics(void);
virtual ~cVeDmVdrstatistics(void);
void Close(void);
void Reset(void) { lastVdrCPU = "undefined"; lastVdrMEM = "undefined"; }
void SetTokenContainer(void);
bool Parse(bool forced = false);