From 027bf9f13252527b285981b569fa233c67c69f38 Mon Sep 17 00:00:00 2001 From: supermerill Date: Wed, 11 Nov 2020 19:42:38 +0100 Subject: [PATCH] fix settings printing & failsafe for gcode viewer --- src/libslic3r/GCode.hpp | 2 +- src/libslic3r/GCode/GCodeProcessor.cpp | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/libslic3r/GCode.hpp b/src/libslic3r/GCode.hpp index b990c5e50..c6f3844ac 100644 --- a/src/libslic3r/GCode.hpp +++ b/src/libslic3r/GCode.hpp @@ -465,7 +465,7 @@ private: #endif // ENABLE_GCODE_VIEWER // Write a string into a file. - void _write(FILE* file, const std::string& what, bool flush = false) { this->_write(file, what.c_str()); } + void _write(FILE* file, const std::string& what, bool flush = false) { this->_write(file, what.c_str(), flush); } void _write(FILE* file, const char *what, bool flush = false); // Write a string into a file. diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index e0c109962..bd8664e61 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -812,11 +812,16 @@ void GCodeProcessor::process_file(const std::string& filename, std::function