Further improvement error reporting with buggy custom G-code sections #1516

1) The macro-processor sanitizes the source code line for invalid UTF-8
   characters. Ideally these invalid characters would be replaced with ?,
   they are just dropped as of now. Better than showing an empty string
   when converting to wxString though.
2) G-code export collects full error message for 1st occurence of an error
   for each custom G-code block.
3) The composite error message now displays the errors collected in 2).
4) The error window is now scaled bigger and the Slicer logo is smaller
   if the text is to be rendered with monospaced font, as the monospaced
   text will not be word wrapped.
This commit is contained in:
Vojtech Bubnik 2020-12-03 12:50:18 +01:00
parent b251fea5fe
commit 3dd9b8c718
7 changed files with 31 additions and 15 deletions

View file

@ -19,6 +19,7 @@
#include "GCode/ThumbnailData.hpp"
#include <memory>
#include <map>
#include <string>
#ifdef HAS_PRESSURE_EQUALIZER
@ -323,7 +324,7 @@ private:
GCodeWriter m_writer;
PlaceholderParser m_placeholder_parser;
// Collection of templates, on which the placeholder substitution failed.
std::set<std::string> m_placeholder_parser_failed_templates;
std::map<std::string, std::string> m_placeholder_parser_failed_templates;
OozePrevention m_ooze_prevention;
Wipe m_wipe;
AvoidCrossingPerimeters m_avoid_crossing_perimeters;