From 2665d4a49bf24f513b1fe3aadc663f47f5f74be5 Mon Sep 17 00:00:00 2001 From: tao wang Date: Thu, 6 Feb 2025 11:46:18 +0800 Subject: [PATCH] ENH:Disable printer selection when printing from SD card jira:[STUDIO-10145] Change-Id: I7d0b95afa3c0403121805090a13b2ab6d46e89b9 (cherry picked from commit 4d616513bedb17b81d6c5469966b5b6116627d00) --- src/slic3r/GUI/SelectMachine.cpp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/slic3r/GUI/SelectMachine.cpp b/src/slic3r/GUI/SelectMachine.cpp index 6f69528fde..0e4845c3fd 100644 --- a/src/slic3r/GUI/SelectMachine.cpp +++ b/src/slic3r/GUI/SelectMachine.cpp @@ -321,13 +321,12 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater) m_comboBox_printer->SetMaxSize(wxSize(FromDIP(250), FromDIP(60))); m_comboBox_printer->SetBackgroundColor(*wxWHITE); m_comboBox_printer->Bind(wxEVT_COMBOBOX, &SelectMachineDialog::on_selection_changed, this); - m_comboBox_printer->Bind(wxEVT_LEFT_DOWN, [=](auto& e) { - if (m_print_type != PrintFromType::FROM_SDCARD_VIEW) {e.Skip();} - }); - m_comboBox_printer->Bind(wxEVT_LEFT_UP, [=](auto &e) { - if (m_print_type != PrintFromType::FROM_SDCARD_VIEW) {e.Skip();} - }); - + //m_comboBox_printer->Bind(wxEVT_LEFT_DOWN, [=](auto& e) { + // if (m_print_type != PrintFromType::FROM_SDCARD_VIEW) {e.Skip();} + //}); + //m_comboBox_printer->Bind(wxEVT_LEFT_UP, [=](auto &e) { + // if (m_print_type != PrintFromType::FROM_SDCARD_VIEW) {e.Skip();} + //}); m_btn_bg_enable = StateColor(std::pair(wxColour(0, 137, 123), StateColor::Pressed), std::pair(wxColour(38, 166, 154), StateColor::Hovered), std::pair(wxColour(0, 150, 136), StateColor::Normal)); @@ -1036,8 +1035,6 @@ void SelectMachineDialog::update_select_layout(MachineObject *obj) void SelectMachineDialog::prepare_mode(bool refresh_button) { - // disable combobox - m_comboBox_printer->Enable(); Enable_Auto_Refill(true); show_print_failed_info(false); @@ -1728,10 +1725,15 @@ void SelectMachineDialog::show_status(PrintDialogStatus status, std::vectorDisable(); - else - m_comboBox_printer->Enable(); + } + else { + if (status == PrintDialogStatus::PrintStatusRefreshingMachineList) + m_comboBox_printer->Disable(); + else + m_comboBox_printer->Enable(); + } // other if (status == PrintDialogStatus::PrintStatusInit) {