FIX:fixed the issue of the hot bed temperature not updating

jira:[STUDIO-8729]

Change-Id: I9f5a4b5252503e26e838b58cd88fd62246ca46a5
This commit is contained in:
tao wang 2024-11-13 14:04:37 +08:00 committed by Lane.Wei
parent db00b3c737
commit 0d81a5fbcb
2 changed files with 6 additions and 13 deletions

View File

@ -182,16 +182,14 @@ void TempInput::SetTagTemp(wxString temp)
void TempInput::SetCurrTemp(int temp) void TempInput::SetCurrTemp(int temp)
{ {
auto tp = wxString::Format("%d", temp); auto tp = wxString::Format("%d", temp);
if (currentTemp != tp) { if (GetLabel() != tp) {
currentTemp = tp;
SetLabel(tp); SetLabel(tp);
} }
} }
void TempInput::SetCurrTemp(wxString temp) void TempInput::SetCurrTemp(wxString temp)
{ {
if (currentTemp != temp) { if (GetLabel() != temp) {
currentTemp = temp;
SetLabel(temp); SetLabel(temp);
} }
} }
@ -257,18 +255,14 @@ void TempInput::Warning(bool warn, WarningType type)
void TempInput::SetIconActive() void TempInput::SetIconActive()
{ {
if (!actice) { actice = true;
actice = true; Refresh();
Refresh();
}
} }
void TempInput::SetIconNormal() void TempInput::SetIconNormal()
{ {
if (actice) { actice = false;
actice = false; Refresh();
Refresh();
}
} }
void TempInput::SetMaxTemp(int temp) { max_temp = temp; } void TempInput::SetMaxTemp(int temp) { max_temp = temp; }

View File

@ -64,7 +64,6 @@ public:
wxPopupTransientWindow *wdialog{nullptr}; wxPopupTransientWindow *wdialog{nullptr};
int temp_type; int temp_type;
bool actice = false; bool actice = false;
wxString currentTemp;
wxString erasePending(wxString &str); wxString erasePending(wxString &str);