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) { void cViewMenuMain::ClearVariables(void) {
init = true; init = true;
lastDrawDynamic = 0;
} }
void cViewMenuMain::SetViewElements(void) { void cViewMenuMain::SetViewElements(void) {

View File

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

View File

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

View File

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