From 2edef8d93ec5aac42f0a7a6330720107f59aac55 Mon Sep 17 00:00:00 2001 From: "zhimin.zeng" Date: Wed, 25 Oct 2023 14:18:09 +0800 Subject: [PATCH] FIX: the position of wipe tower changed when new plate Jira: XXXX Change-Id: I76512b0efddef099cec66fea23a16391b927192a --- src/slic3r/GUI/PartPlate.cpp | 6 +++--- src/slic3r/GUI/PartPlate.hpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/slic3r/GUI/PartPlate.cpp b/src/slic3r/GUI/PartPlate.cpp index 59accca7c..2e48a7912 100644 --- a/src/slic3r/GUI/PartPlate.cpp +++ b/src/slic3r/GUI/PartPlate.cpp @@ -3368,7 +3368,7 @@ void PartPlateList::reset_size(int width, int depth, int height, bool reload_obj m_plate_width = width; m_plate_depth = depth; m_plate_height = height; - update_all_plates_pos_and_size(false, false); + update_all_plates_pos_and_size(false, false, true); if (update_shapes) { set_shapes(m_shape, m_exclude_areas, m_logo_texture_filename, m_height_to_lid, m_height_to_rod); } @@ -3868,7 +3868,7 @@ void PartPlateList::update_plate_cols() return; } -void PartPlateList::update_all_plates_pos_and_size(bool adjust_position, bool with_unprintable_move) +void PartPlateList::update_all_plates_pos_and_size(bool adjust_position, bool with_unprintable_move, bool switch_plate_type) { Vec3d origin1, origin2; for (unsigned int i = 0; i < (unsigned int)m_plate_list.size(); ++i) @@ -3881,7 +3881,7 @@ void PartPlateList::update_all_plates_pos_and_size(bool adjust_position, bool wi plate->set_pos_and_size(origin1, m_plate_width, m_plate_depth, m_plate_height, adjust_position); // set default wipe pos when switch plate - if (m_plater && plate->get_used_extruders().size() <= 0) { + if (switch_plate_type && m_plater && plate->get_used_extruders().size() <= 0) { set_default_wipe_tower_pos_for_plate(i); } } diff --git a/src/slic3r/GUI/PartPlate.hpp b/src/slic3r/GUI/PartPlate.hpp index 0d0b05465..c194b017d 100644 --- a/src/slic3r/GUI/PartPlate.hpp +++ b/src/slic3r/GUI/PartPlate.hpp @@ -700,7 +700,7 @@ public: //update the plate cols due to plate count change void update_plate_cols(); - void update_all_plates_pos_and_size(bool adjust_position = true, bool with_unprintable_move = true); + void update_all_plates_pos_and_size(bool adjust_position = true, bool with_unprintable_move = true, bool switch_plate_type = false); //get the plate cols int get_plate_cols() { return m_plate_cols; }