From 17c84d0cb7e7dcbd8249b306846412ec3c5d88e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hejl?= Date: Fri, 3 Jan 2025 14:13:10 +0100 Subject: [PATCH] SPE-2626: Invalidate the wipe tower when the number of instances changes. (#13779) WipingExtrusions::mark_wiping_extrusions() precalculates data based on the number of instances when wiping into infill/object is enabled, so we need to invalidate those data when the number of instances changes. --- src/libslic3r/PrintApply.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libslic3r/PrintApply.cpp b/src/libslic3r/PrintApply.cpp index 32992bea1b..d399e9d53d 100644 --- a/src/libslic3r/PrintApply.cpp +++ b/src/libslic3r/PrintApply.cpp @@ -1336,7 +1336,9 @@ Print::ApplyStatus Print::apply(const Model &model, DynamicPrintConfig new_full_ if (model_object.instances.size() != model_object_new.instances.size() || ! std::equal(model_object.instances.begin(), model_object.instances.end(), model_object_new.instances.begin(), [](auto l, auto r){ return l->id() == r->id(); })) { // G-code generator accesses model_object.instances to generate sequential print ordering matching the Plater object list. - update_apply_status(this->invalidate_step(psGCodeExport)); + // WipingExtrusions::mark_wiping_extrusions() precalculate data based on the number of instances when wiping into infill/object is enabled. + update_apply_status(this->invalidate_steps({psGCodeExport, psWipeTower})); + model_object.clear_instances(); model_object.instances.reserve(model_object_new.instances.size()); for (const ModelInstance *model_instance : model_object_new.instances) {