mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 11:53:48 +00:00
ENH:Disable printer selection when printing from SD card
jira:[STUDIO-10145] Change-Id: I7d0b95afa3c0403121805090a13b2ab6d46e89b9 (cherry picked from commit 4d616513bedb17b81d6c5469966b5b6116627d00)
This commit is contained in:
@@ -321,13 +321,12 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
|
|||||||
m_comboBox_printer->SetMaxSize(wxSize(FromDIP(250), FromDIP(60)));
|
m_comboBox_printer->SetMaxSize(wxSize(FromDIP(250), FromDIP(60)));
|
||||||
m_comboBox_printer->SetBackgroundColor(*wxWHITE);
|
m_comboBox_printer->SetBackgroundColor(*wxWHITE);
|
||||||
m_comboBox_printer->Bind(wxEVT_COMBOBOX, &SelectMachineDialog::on_selection_changed, this);
|
m_comboBox_printer->Bind(wxEVT_COMBOBOX, &SelectMachineDialog::on_selection_changed, this);
|
||||||
m_comboBox_printer->Bind(wxEVT_LEFT_DOWN, [=](auto& e) {
|
//m_comboBox_printer->Bind(wxEVT_LEFT_DOWN, [=](auto& e) {
|
||||||
if (m_print_type != PrintFromType::FROM_SDCARD_VIEW) {e.Skip();}
|
// if (m_print_type != PrintFromType::FROM_SDCARD_VIEW) {e.Skip();}
|
||||||
});
|
//});
|
||||||
m_comboBox_printer->Bind(wxEVT_LEFT_UP, [=](auto &e) {
|
//m_comboBox_printer->Bind(wxEVT_LEFT_UP, [=](auto &e) {
|
||||||
if (m_print_type != PrintFromType::FROM_SDCARD_VIEW) {e.Skip();}
|
// if (m_print_type != PrintFromType::FROM_SDCARD_VIEW) {e.Skip();}
|
||||||
});
|
//});
|
||||||
|
|
||||||
m_btn_bg_enable = StateColor(std::pair<wxColour, int>(wxColour(0, 137, 123), StateColor::Pressed), std::pair<wxColour, int>(wxColour(38, 166, 154), StateColor::Hovered),
|
m_btn_bg_enable = StateColor(std::pair<wxColour, int>(wxColour(0, 137, 123), StateColor::Pressed), std::pair<wxColour, int>(wxColour(38, 166, 154), StateColor::Hovered),
|
||||||
std::pair<wxColour, int>(wxColour(0, 150, 136), StateColor::Normal));
|
std::pair<wxColour, int>(wxColour(0, 150, 136), StateColor::Normal));
|
||||||
|
|
||||||
@@ -1036,8 +1035,6 @@ void SelectMachineDialog::update_select_layout(MachineObject *obj)
|
|||||||
|
|
||||||
void SelectMachineDialog::prepare_mode(bool refresh_button)
|
void SelectMachineDialog::prepare_mode(bool refresh_button)
|
||||||
{
|
{
|
||||||
// disable combobox
|
|
||||||
m_comboBox_printer->Enable();
|
|
||||||
Enable_Auto_Refill(true);
|
Enable_Auto_Refill(true);
|
||||||
show_print_failed_info(false);
|
show_print_failed_info(false);
|
||||||
|
|
||||||
@@ -1728,10 +1725,15 @@ void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector<wxSt
|
|||||||
m_print_status = status;
|
m_print_status = status;
|
||||||
|
|
||||||
// m_comboBox_printer
|
// m_comboBox_printer
|
||||||
|
if (m_print_type == PrintFromType::FROM_SDCARD_VIEW) {
|
||||||
|
m_comboBox_printer->Disable();
|
||||||
|
}
|
||||||
|
else {
|
||||||
if (status == PrintDialogStatus::PrintStatusRefreshingMachineList)
|
if (status == PrintDialogStatus::PrintStatusRefreshingMachineList)
|
||||||
m_comboBox_printer->Disable();
|
m_comboBox_printer->Disable();
|
||||||
else
|
else
|
||||||
m_comboBox_printer->Enable();
|
m_comboBox_printer->Enable();
|
||||||
|
}
|
||||||
|
|
||||||
// other
|
// other
|
||||||
if (status == PrintDialogStatus::PrintStatusInit) {
|
if (status == PrintDialogStatus::PrintStatusInit) {
|
||||||
|
|||||||
Reference in New Issue
Block a user