From 9505df87c112d9f8b4a34cfbc9ec7687cfbbb7f4 Mon Sep 17 00:00:00 2001 From: "xin.zhang" Date: Thu, 3 Apr 2025 17:04:01 +0800 Subject: [PATCH] FIX: move the pre-check jira: [none] Change-Id: Ia11d9dfbce9b7013daf85231f68a6ec9f3d2e609 --- src/slic3r/GUI/PrintOptionsDialog.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/slic3r/GUI/PrintOptionsDialog.cpp b/src/slic3r/GUI/PrintOptionsDialog.cpp index 21ecf0a1f..3716b8950 100644 --- a/src/slic3r/GUI/PrintOptionsDialog.cpp +++ b/src/slic3r/GUI/PrintOptionsDialog.cpp @@ -820,11 +820,6 @@ void PrinterPartsDialog::set_nozzle_data(wxCommandEvent& evt) nozzle_id = MAIN_NOZZLE_ID; } - /*filter invalid set*/ - if (current_nozzle_type_combox && current_nozzle_type_combox->IsShown() && current_nozzle_type_combox->GetValue().IsEmpty()) { return; } - if (current_nozzle_diameter_combox && current_nozzle_diameter_combox->IsShown() && current_nozzle_diameter_combox->GetValue().IsEmpty()) { return; } - if (current_nozzle_flow_combox && current_nozzle_flow_combox->IsShown() && current_nozzle_flow_combox->GetValue().IsEmpty()) { return; } - if (obj) { try { auto nozzle_type = NozzleType::ntHardenedSteel; @@ -886,6 +881,8 @@ void PrinterPartsDialog::set_nozzle_data(wxCommandEvent& evt) } if (!obj->is_enable_np) { + if (current_nozzle_type_combox && current_nozzle_type_combox->IsShown() && current_nozzle_type_combox->GetValue().IsEmpty()) { return; } + if (current_nozzle_diameter_combox && current_nozzle_diameter_combox->IsShown() && current_nozzle_diameter_combox->GetValue().IsEmpty()) { return; } obj->m_extder_data.extders[MAIN_NOZZLE_ID].current_nozzle_diameter = nozzle_diameter; obj->m_extder_data.extders[MAIN_NOZZLE_ID].current_nozzle_type = nozzle_type; obj->command_set_printer_nozzle(NozzleTypeEumnToStr[nozzle_type], nozzle_diameter); @@ -909,6 +906,9 @@ void PrinterPartsDialog::set_nozzle_data(wxCommandEvent& evt) return; } + if (current_nozzle_type_combox && current_nozzle_type_combox->IsShown() && current_nozzle_type_combox->GetValue().IsEmpty()) { return; } + if (current_nozzle_diameter_combox && current_nozzle_diameter_combox->IsShown() && current_nozzle_diameter_combox->GetValue().IsEmpty()) { return; } + if (current_nozzle_flow_combox && current_nozzle_flow_combox->IsShown() && current_nozzle_flow_combox->GetValue().IsEmpty()) { return; } obj->m_extder_data.extders[nozzle_id].current_nozzle_diameter = nozzle_diameter; obj->m_extder_data.extders[nozzle_id].current_nozzle_flow_type = nozzle_flow; obj->m_extder_data.extders[nozzle_id].current_nozzle_type = nozzle_type;