From 00764ceadec5094ea0c85f3c8b49d8b49de6fc0d Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Fri, 7 Jan 2022 13:12:40 +0100 Subject: [PATCH] Fix ignoring of changed sla printer params --- src/libslic3r/SLAPrint.cpp | 6 +++--- src/libslic3r/SLAPrint.hpp | 4 ++-- src/libslic3r/SLAPrintSteps.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/libslic3r/SLAPrint.cpp b/src/libslic3r/SLAPrint.cpp index ddf3d1419..746def7c4 100644 --- a/src/libslic3r/SLAPrint.cpp +++ b/src/libslic3r/SLAPrint.cpp @@ -244,11 +244,11 @@ SLAPrint::ApplyStatus SLAPrint::apply(const Model &model, DynamicPrintConfig con // Handle changes to object config defaults m_default_object_config.apply_only(config, object_diff, true); - if (!m_printer || std::find(printer_diff.begin(), printer_diff.end(), "sla_archive_format") != printer_diff.end()) { + if (!m_archiver || !printer_diff.empty()) { if (m_printer_config.sla_archive_format.value == "SL1") - m_printer = std::make_unique(m_printer_config); + m_archiver = std::make_unique(m_printer_config); else if (m_printer_config.sla_archive_format.value == "SL2") - m_printer = std::make_unique(m_printer_config); + m_archiver = std::make_unique(m_printer_config); } struct ModelObjectStatus { diff --git a/src/libslic3r/SLAPrint.hpp b/src/libslic3r/SLAPrint.hpp index 58e090c4b..b2df0c4e9 100644 --- a/src/libslic3r/SLAPrint.hpp +++ b/src/libslic3r/SLAPrint.hpp @@ -536,7 +536,7 @@ public: void export_print(Zipper &zipper, const std::string &projectname = "") { - m_printer->export_print(zipper, *this, projectname); + m_archiver->export_print(zipper, *this, projectname); } void export_print(const std::string &fname, const std::string &projectname = "") @@ -565,7 +565,7 @@ private: std::vector m_printer_input; // The archive object which collects the raster images after slicing - std::unique_ptr m_printer; + std::unique_ptr m_archiver; // Estimated print time, material consumed. SLAPrintStatistics m_print_statistics; diff --git a/src/libslic3r/SLAPrintSteps.cpp b/src/libslic3r/SLAPrintSteps.cpp index fa7348781..435e8c8e3 100644 --- a/src/libslic3r/SLAPrintSteps.cpp +++ b/src/libslic3r/SLAPrintSteps.cpp @@ -1044,7 +1044,7 @@ void SLAPrint::Steps::merge_slices_and_eval_stats() { // Rasterizing the model objects, and their supports void SLAPrint::Steps::rasterize() { - if(canceled() || !m_print->m_printer) return; + if(canceled() || !m_print->m_archiver) return; // coefficient to map the rasterization state (0-99) to the allocated // portion (slot) of the process state @@ -1089,7 +1089,7 @@ void SLAPrint::Steps::rasterize() if(canceled()) return; // Print all the layers in parallel - m_print->m_printer->draw_layers(m_print->m_printer_input.size(), lvlfn, + m_print->m_archiver->draw_layers(m_print->m_printer_input.size(), lvlfn, [this]() { return canceled(); }, ex_tbb); }