From df7a9b126708776465529f806a60cefaa2de9d11 Mon Sep 17 00:00:00 2001 From: "zhimin.zeng" Date: Tue, 24 Sep 2024 10:10:04 +0800 Subject: [PATCH] FIX: single ams should not include vt slot jira: none Change-Id: I338b57c031b551783abea78ef021537d2d89dee9 (cherry picked from commit f68a8aed24c5a0e09bea3845a19e765d68e4791a) --- src/slic3r/GUI/Plater.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 13dec6b16a..3e524f56ea 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -756,14 +756,23 @@ void Sidebar::priv::sync_extruder_list() dlg.ShowModal(); return; } - int left = 0, right = 0; + int left_4 = 0, right_4 = 0, left_1 = 0, right_1 = 0; for (auto ams : obj->amsList) { // Main (first) extruder at right - if (ams.second->nozzle == 0) ++right; - else if(ams.second->nozzle == 1) ++left; + if (ams.second->nozzle == 0) { + if (ams.second->type == 4) // N3S + ++right_1; + else + ++right_4; + } else if (ams.second->nozzle == 1) { + if (ams.second->type == 4) // N3S + ++left_1; + else + ++left_4; + } } - AMSCountPopupWindow::SetAMSCount(0, left, obj->vt_slot.size() > 1); - AMSCountPopupWindow::SetAMSCount(1, right, 1); + AMSCountPopupWindow::SetAMSCount(0, left_4, left_1); + AMSCountPopupWindow::SetAMSCount(1, right_4, right_1); AMSCountPopupWindow::UpdateAMSCount(0, m_left_ams_count); AMSCountPopupWindow::UpdateAMSCount(1, m_right_ams_count); }