FIX: add a warning dialog

jira: [STUDIO-9715]
Change-Id: I376235de8a8569e63530eca914dc977a670a769c
(cherry picked from commit 4f1ad8016e11d5440127b45c48854c1ed2cf75aa)
This commit is contained in:
xin.zhang
2025-01-14 17:20:44 +08:00
committed by Noisyfox
parent 16a32d0cc4
commit 2878eb50f1
5 changed files with 27 additions and 1 deletions

View File

@@ -1 +1 @@
02.00.00.01 02.00.00.02

View File

@@ -3268,6 +3268,15 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
chamber_temp_edit_min = support_champer_range[0]; chamber_temp_edit_min = support_champer_range[0];
chamber_temp_edit_max = support_champer_range[1]; chamber_temp_edit_max = support_champer_range[1];
} }
if (jj.contains("support_chamber_temp_switch_heating"))
{
const auto& support_chamber_temp_switch_heating = jj["support_chamber_temp_switch_heating"];
if (support_chamber_temp_switch_heating.is_number())
{
chamber_temp_switch_heat = support_chamber_temp_switch_heating.get<long>();
}
}
} }
if (jj.contains("support_extrusion_cali")) { if (jj.contains("support_extrusion_cali")) {

View File

@@ -737,6 +737,7 @@ public:
float chamber_temp_target; float chamber_temp_target;
float chamber_temp_edit_min = 0; float chamber_temp_edit_min = 0;
float chamber_temp_edit_max = 60; float chamber_temp_edit_max = 60;
long chamber_temp_switch_heat = LONG_MAX;/*default to LONG_MAX*/
float frame_temp; float frame_temp;
/* cooling */ /* cooling */

View File

@@ -3885,6 +3885,18 @@ void StatusPanel::on_set_chamber_temp()
m_tempCtrl_chamber->SetTagTemp(wxString::Format("%d", chamber_temp)); m_tempCtrl_chamber->SetTagTemp(wxString::Format("%d", chamber_temp));
m_tempCtrl_chamber->Warning(false); m_tempCtrl_chamber->Warning(false);
} }
if (chamber_temp > obj->chamber_temp_switch_heat)
{
delete champer_switch_head_dlg;
champer_switch_head_dlg = new MessageDialog(nullptr, _L("If the chamber temperature exceeds 40\u2103, the system will automatically switch to heating mode. Please confirm whether to switch."), wxEmptyString, wxICON_WARNING | wxOK | wxCANCEL);
if (champer_switch_head_dlg->ShowModal() != wxID_OK)
{
return;
}
}
obj->command_set_chamber(chamber_temp); obj->command_set_chamber(chamber_temp);
} }
} }

View File

@@ -41,6 +41,9 @@ class StepIndicator;
namespace Slic3r { namespace Slic3r {
namespace GUI { namespace GUI {
// Previous definitions
class MessageDialog;
enum CameraRecordingStatus { enum CameraRecordingStatus {
RECORDING_NONE, RECORDING_NONE,
RECORDING_OFF_NORMAL, RECORDING_OFF_NORMAL,
@@ -565,6 +568,7 @@ protected:
SecondaryCheckDialog* con_load_dlg = nullptr; SecondaryCheckDialog* con_load_dlg = nullptr;
SecondaryCheckDialog* ctrl_e_hint_dlg = nullptr; SecondaryCheckDialog* ctrl_e_hint_dlg = nullptr;
SecondaryCheckDialog* sdcard_hint_dlg = nullptr; SecondaryCheckDialog* sdcard_hint_dlg = nullptr;
MessageDialog* champer_switch_head_dlg = nullptr;
FanControlPopupNew* m_fan_control_popup{nullptr}; FanControlPopupNew* m_fan_control_popup{nullptr};