ENH:close the auto refresh window when sending tasks

STUDIO-3492

Change-Id: I9f1272a5d105e8fad379ca95820447d33eb49b1a
This commit is contained in:
tao wang 2023-06-29 20:55:24 +08:00 committed by Lane.Wei
parent ffd36b8c5e
commit 1a8622b7f9
2 changed files with 16 additions and 2 deletions

View file

@ -1127,8 +1127,8 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
m_ams_backup_tip->Bind(wxEVT_LEAVE_WINDOW, [this](auto& e) {SetCursor(wxCURSOR_ARROW); });
img_ams_backup->Bind(wxEVT_LEAVE_WINDOW, [this](auto& e) {SetCursor(wxCURSOR_ARROW); });
m_ams_backup_tip->Bind(wxEVT_LEFT_DOWN, [this](auto& e) {popup_filament_backup(); on_rename_enter(); });
img_ams_backup->Bind(wxEVT_LEFT_DOWN, [this](auto& e) {popup_filament_backup(); });
m_ams_backup_tip->Bind(wxEVT_LEFT_DOWN, [this](auto& e) { if (!m_is_in_sending_mode) {popup_filament_backup(); on_rename_enter();} });
img_ams_backup->Bind(wxEVT_LEFT_DOWN, [this](auto& e) {if (!m_is_in_sending_mode) popup_filament_backup();on_rename_enter(); });
m_statictext_ams_msg = new wxStaticText(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER_HORIZONTAL);
m_statictext_ams_msg->SetFont(::Label::Body_13);
@ -1684,6 +1684,7 @@ void SelectMachineDialog::prepare_mode()
{
// disable combobox
m_comboBox_printer->Enable();
Enable_Auto_Refill(true);
show_print_failed_info(false);
m_is_in_sending_mode = false;
@ -1715,6 +1716,7 @@ void SelectMachineDialog::sending_mode()
{
// disable combobox
m_comboBox_printer->Disable();
Enable_Auto_Refill(false);
m_is_in_sending_mode = true;
if (m_simplebook->GetSelection() != 1){
@ -2345,6 +2347,17 @@ void SelectMachineDialog::on_ok_btn(wxCommandEvent &event)
}
}
void SelectMachineDialog::Enable_Auto_Refill(bool enable)
{
if (enable) {
m_ams_backup_tip->SetForegroundColour(wxColour(0x00AE42));
}
else {
m_ams_backup_tip->SetForegroundColour(wxColour(0x90, 0x90, 0x90));
}
m_ams_backup_tip->Refresh();
}
void SelectMachineDialog::connect_printer_mqtt()
{
DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager();