diff --git a/src/slic3r/GUI/SelectMachine.cpp b/src/slic3r/GUI/SelectMachine.cpp index bfb873a766..d2f7d68aab 100644 --- a/src/slic3r/GUI/SelectMachine.cpp +++ b/src/slic3r/GUI/SelectMachine.cpp @@ -1767,6 +1767,8 @@ void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector 0) @@ -3224,6 +3226,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_)) { @@ -3250,10 +3263,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(); @@ -4499,6 +4508,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 62e1e87d79..301cbe9d89 100644 --- a/src/slic3r/GUI/SelectMachine.hpp +++ b/src/slic3r/GUI/SelectMachine.hpp @@ -103,7 +103,8 @@ enum PrintDialogStatus { PrintStatusTimelapseWarning, PrintStatusMixAmsAndVtSlotWarning, PrintStatusPublicInitFailed, - PrintStatusPublicUploadFiled + PrintStatusPublicUploadFiled, + PrintStatusInvalidMapping };