diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index 51e4c88c1..d71dd347a 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -450,6 +450,7 @@ void GCodeProcessorResult::reset() { filament_cost = std::vector(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_COST); custom_gcode_per_print_z = std::vector(); spiral_vase_layers = std::vector>>(); + conflict_result = std::nullopt; time = 0; } #else @@ -468,6 +469,7 @@ void GCodeProcessorResult::reset() { filament_cost = std::vector(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_COST); custom_gcode_per_print_z = std::vector(); spiral_vase_layers = std::vector>>(); + conflict_result = std::nullopt; } #endif // ENABLE_GCODE_VIEWER_STATISTICS diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 57ccc9a82..a184c1ccd 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -1001,7 +1001,8 @@ std::string Print::export_gcode(const std::string& path_template, GCodeProcessor std::unique_ptr gcode(new GCode); gcode->do_export(this, path.c_str(), result, thumbnail_cb); - result->conflict_result = m_conflict_result; + if (m_conflict_result.has_value()) + result->conflict_result = *m_conflict_result; return path.c_str(); }