From 5675ed53dae08f41649b6c44bbadceab8570a41d 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 | 4 +++- 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, 21 insertions(+), 1 deletion(-) diff --git a/resources/config.json b/resources/config.json index 696ddb1dc..f6d33686a 100644 --- a/resources/config.json +++ b/resources/config.json @@ -18,7 +18,9 @@ "FUNC_ALTER_RESOLUTION": false, "FUNC_AUTO_SWITCH_FILAMENT": false, "FUNC_EXTRUSION_CALI": true, - "FUNC_CHAMBER_FAN" : false }, + "FUNC_PRINT_ALL" : false, + "FUNC_CHAMBER_FAN" : false + }, "camera_resolution":["720p"], "bed_temperature_limit": 100, "model_id": "C11", diff --git a/src/slic3r/GUI/DeviceManager.cpp b/src/slic3r/GUI/DeviceManager.cpp index 777d22c4d..2bb5c7e78 100644 --- a/src/slic3r/GUI/DeviceManager.cpp +++ b/src/slic3r/GUI/DeviceManager.cpp @@ -2176,6 +2176,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 };