diff --git a/src/slic3r/GUI/SelectMachine.cpp b/src/slic3r/GUI/SelectMachine.cpp index 4dd03fc17..9e8e86020 100644 --- a/src/slic3r/GUI/SelectMachine.cpp +++ b/src/slic3r/GUI/SelectMachine.cpp @@ -1769,6 +1769,8 @@ void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector 0) @@ -3236,6 +3238,17 @@ void SelectMachineDialog::update_show_status() } } + + // disable print when there is no mapping + if (obj_->m_extder_data.total_extder_count > 1) { + for (auto mres : m_ams_mapping_result) { + if (mres.ams_id.empty() && mres.slot_id.empty()) { + show_status(PrintDialogStatus::PrintStatusInvalidMapping); + return; + } + } + } + // no ams if (!obj_->has_ams() || m_checkbox_list["use_ams"]->getValue() != "on") { if (!has_tips(obj_)) { @@ -3262,10 +3275,6 @@ void SelectMachineDialog::update_show_status() return; } - //if (m_ams_mapping_result.empty()) { - // do_ams_mapping(obj_); - //} - const auto& full_config = wxGetApp().preset_bundle->full_config(); size_t nozzle_nums = full_config.option("nozzle_diameter")->values.size(); @@ -4511,6 +4520,7 @@ std::string SelectMachineDialog::get_print_status_info(PrintDialogStatus status) case PrintStatusUnsupportedPrinter: return "PrintStatusUnsupportedPrinter"; case PrintStatusTimelapseNoSdcard: return "PrintStatusTimelapseNoSdcard"; case PrintStatusNotSupportedPrintAll: return "PrintStatusNotSupportedPrintAll"; + case PrintStatusInvalidMapping: return "PrintStatusInvalidMapping"; } return "unknown"; } diff --git a/src/slic3r/GUI/SelectMachine.hpp b/src/slic3r/GUI/SelectMachine.hpp index b861dfd98..bfe294fb4 100644 --- a/src/slic3r/GUI/SelectMachine.hpp +++ b/src/slic3r/GUI/SelectMachine.hpp @@ -101,7 +101,8 @@ enum PrintDialogStatus { PrintStatusTimelapseWarning, PrintStatusMixAmsAndVtSlotWarning, PrintStatusPublicInitFailed, - PrintStatusPublicUploadFiled + PrintStatusPublicUploadFiled, + PrintStatusInvalidMapping }; class Material