From d25f7535a973378513600787ee2a7f45821d3ab0 Mon Sep 17 00:00:00 2001 From: Stone Li Date: Fri, 13 Jan 2023 15:27:31 +0800 Subject: [PATCH] ENH: add tips for P1P when printing all is not supported Change-Id: I5caa5dbc2d9cd3c57318a2366c8a8ef494d4df31 Signed-off-by: Stone Li --- resources/config.json | 1 + src/slic3r/GUI/DeviceManager.cpp | 3 +++ src/slic3r/GUI/DeviceManager.hpp | 1 + src/slic3r/GUI/SelectMachine.cpp | 13 +++++++++++++ src/slic3r/GUI/SelectMachine.hpp | 1 + 5 files changed, 19 insertions(+) diff --git a/resources/config.json b/resources/config.json index 56482f373..c3957b877 100644 --- a/resources/config.json +++ b/resources/config.json @@ -19,6 +19,7 @@ "FUNC_AUTO_SWITCH_FILAMENT": false, "FUNC_CHAMBER_FAN" : false, "FUNC_EXTRUSION_CALI": true, + "FUNC_PRINT_ALL" : false, "FUNC_SEND_TO_SDCARD": false }, "camera_resolution":["720p"], diff --git a/src/slic3r/GUI/DeviceManager.cpp b/src/slic3r/GUI/DeviceManager.cpp index cb39d1c30..ddb742426 100644 --- a/src/slic3r/GUI/DeviceManager.cpp +++ b/src/slic3r/GUI/DeviceManager.cpp @@ -2177,6 +2177,9 @@ bool MachineObject::is_function_supported(PrinterFunction func) return false; func_name = "FUNC_EXTRUSION_CALI"; break; + case FUNC_PRINT_ALL: + func_name = "FUNC_PRINT_ALL"; + break; default: return true; } diff --git a/src/slic3r/GUI/DeviceManager.hpp b/src/slic3r/GUI/DeviceManager.hpp index 66b95b4c5..628fe943c 100644 --- a/src/slic3r/GUI/DeviceManager.hpp +++ b/src/slic3r/GUI/DeviceManager.hpp @@ -88,6 +88,7 @@ enum PrinterFunction { FUNC_AUTO_SWITCH_FILAMENT, FUNC_CHAMBER_FAN, FUNC_EXTRUSION_CALI, + FUNC_PRINT_ALL, FUNC_MAX }; diff --git a/src/slic3r/GUI/SelectMachine.cpp b/src/slic3r/GUI/SelectMachine.cpp index ccb1e9717..fda8a3e51 100644 --- a/src/slic3r/GUI/SelectMachine.cpp +++ b/src/slic3r/GUI/SelectMachine.cpp @@ -92,6 +92,8 @@ std::string get_print_status_info(PrintDialogStatus status) return "PrintStatusNoSdcard"; case PrintStatusTimelapseNoSdcard: return "PrintStatusTimelapseNoSdcard"; + case PrintStatusNotSupportedPrintAll: + return "PrintStatusNotSupportedPrintAll"; } return "unknown"; } @@ -1873,6 +1875,11 @@ void SelectMachineDialog::show_status(PrintDialogStatus status, std::vectoris_function_supported(PrinterFunction::FUNC_PRINT_ALL) && m_print_plate_idx == PLATE_ALL_IDX) { + show_status(PrintDialogStatus::PrintStatusNotSupportedPrintAll); + return; + } + + // do ams mapping if no ams result if (obj_->has_ams() && m_ams_mapping_result.empty()) { if (obj_->ams_support_use_ams) { diff --git a/src/slic3r/GUI/SelectMachine.hpp b/src/slic3r/GUI/SelectMachine.hpp index 32bcd75d5..231c041ca 100644 --- a/src/slic3r/GUI/SelectMachine.hpp +++ b/src/slic3r/GUI/SelectMachine.hpp @@ -260,6 +260,7 @@ enum PrintDialogStatus { PrintStatusNeedForceUpgrading, PrintStatusNeedConsistencyUpgrading, PrintStatusNotSupportedSendToSDCard, + PrintStatusNotSupportedPrintAll, PrintStatusBlankPlate };