From dced3ce783c9a3a1f626bf9497fa5d611146f3bf Mon Sep 17 00:00:00 2001 From: bubnikv Date: Fri, 24 Jan 2020 17:10:59 +0100 Subject: [PATCH] Fix of 2.2.0-A3: Sequential Printing: Wrong location after slicing #3570 This is a regression from 71fa411 --- src/libslic3r/PrintObject.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index adae28e4b..4d6df36db 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -73,6 +73,8 @@ PrintObject::PrintObject(Print* print, ModelObject* model_object, bool add_insta PrintBase::ApplyStatus PrintObject::set_instances(PrintInstances &&instances) { + for (PrintInstance &i : instances) + i.shift += m_copies_shift; // Invalidate and set copies. PrintBase::ApplyStatus status = PrintBase::APPLY_STATUS_UNCHANGED; bool equal_length = instances.size() == m_instances.size(); @@ -83,7 +85,7 @@ PrintBase::ApplyStatus PrintObject::set_instances(PrintInstances &&instances) if (m_print->invalidate_steps({ psSkirt, psBrim, psGCodeExport }) || (! equal_length && m_print->invalidate_step(psWipeTower))) status = PrintBase::APPLY_STATUS_INVALIDATED; - m_instances = instances; + m_instances = std::move(instances); for (PrintInstance &i : m_instances) i.print_object = this; }