From 0d81a5fbcbcfafdc2906b20a4f09f9bc043ea07b Mon Sep 17 00:00:00 2001 From: tao wang Date: Wed, 13 Nov 2024 14:04:37 +0800 Subject: [PATCH] FIX:fixed the issue of the hot bed temperature not updating jira:[STUDIO-8729] Change-Id: I9f5a4b5252503e26e838b58cd88fd62246ca46a5 --- src/slic3r/GUI/Widgets/TempInput.cpp | 18 ++++++------------ src/slic3r/GUI/Widgets/TempInput.hpp | 1 - 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/slic3r/GUI/Widgets/TempInput.cpp b/src/slic3r/GUI/Widgets/TempInput.cpp index 8faa7145c..f8ae35660 100644 --- a/src/slic3r/GUI/Widgets/TempInput.cpp +++ b/src/slic3r/GUI/Widgets/TempInput.cpp @@ -182,16 +182,14 @@ void TempInput::SetTagTemp(wxString temp) void TempInput::SetCurrTemp(int temp) { auto tp = wxString::Format("%d", temp); - if (currentTemp != tp) { - currentTemp = tp; + if (GetLabel() != tp) { SetLabel(tp); } } void TempInput::SetCurrTemp(wxString temp) { - if (currentTemp != temp) { - currentTemp = temp; + if (GetLabel() != temp) { SetLabel(temp); } } @@ -257,18 +255,14 @@ void TempInput::Warning(bool warn, WarningType type) void TempInput::SetIconActive() { - if (!actice) { - actice = true; - Refresh(); - } + actice = true; + Refresh(); } void TempInput::SetIconNormal() { - if (actice) { - actice = false; - Refresh(); - } + actice = false; + Refresh(); } void TempInput::SetMaxTemp(int temp) { max_temp = temp; } diff --git a/src/slic3r/GUI/Widgets/TempInput.hpp b/src/slic3r/GUI/Widgets/TempInput.hpp index 426358dea..c86d3a712 100644 --- a/src/slic3r/GUI/Widgets/TempInput.hpp +++ b/src/slic3r/GUI/Widgets/TempInput.hpp @@ -64,7 +64,6 @@ public: wxPopupTransientWindow *wdialog{nullptr}; int temp_type; bool actice = false; - wxString currentTemp; wxString erasePending(wxString &str);