From 34242a1932e65e9fbd4f7241ff2b48202ee09b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20=C5=A0ach?= Date: Fri, 6 Dec 2024 11:45:41 +0100 Subject: [PATCH] Fix wipe tower invalidating other beds --- src/libslic3r/MultipleBeds.cpp | 3 +++ src/libslic3r/PrintApply.cpp | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libslic3r/MultipleBeds.cpp b/src/libslic3r/MultipleBeds.cpp index 77ccfbf959..a40606d76a 100644 --- a/src/libslic3r/MultipleBeds.cpp +++ b/src/libslic3r/MultipleBeds.cpp @@ -211,13 +211,16 @@ void restore_object_instances(Model& model, const ObjectInstances &object_instan void with_single_bed_model(Model &model, const int bed_index, const std::function &callable) { const InstanceOffsets original_offssets{MultipleBedsUtils::get_instance_offsets(model)}; const ObjectInstances original_objects{get_object_instances(model)}; + const int original_bed{s_multiple_beds.get_active_bed()}; Slic3r::ScopeGuard guard([&]() { restore_object_instances(model, original_objects); restore_instance_offsets(model, original_offssets); + s_multiple_beds.set_active_bed(original_bed); }); s_multiple_beds.move_from_bed_to_first_bed(model, bed_index); s_multiple_beds.remove_instances_outside_outside_bed(model, bed_index); + s_multiple_beds.set_active_bed(bed_index); callable(); } diff --git a/src/libslic3r/PrintApply.cpp b/src/libslic3r/PrintApply.cpp index 3ab77d7a64..7f2dc492c4 100644 --- a/src/libslic3r/PrintApply.cpp +++ b/src/libslic3r/PrintApply.cpp @@ -1123,8 +1123,9 @@ Print::ApplyStatus Print::apply(const Model &model, DynamicPrintConfig new_full_ } // Check the position and rotation of the wipe tower. - if (model.wipe_tower() != m_model.wipe_tower()) + if (model.wipe_tower() != m_model.wipe_tower()) { update_apply_status(this->invalidate_step(psSkirtBrim)); + } m_model.wipe_tower() = model.wipe_tower(); ModelObjectStatusDB model_object_status_db;