#7008 - GCodeViewer - Fixed loading of gcodes generated by SuperSlicer

This commit is contained in:
enricoturri1966 2021-09-27 11:22:36 +02:00
parent 43470af0c6
commit 7ca9024fca
5 changed files with 69 additions and 1 deletions

View file

@ -740,7 +740,11 @@ ConfigSubstitutions ConfigBase::load(const boost::property_tree::ptree &tree, Fo
}
// Load the config keys from the given string.
static inline size_t load_from_gcode_string_legacy(ConfigBase &config, const char *str, ConfigSubstitutionContext &substitutions)
#if ENABLE_FIX_SUPERSLICER_GCODE_IMPORT
size_t ConfigBase::load_from_gcode_string_legacy(ConfigBase& config, const char* str, ConfigSubstitutionContext& substitutions)
#else
static inline size_t load_from_gcode_string_legacy(ConfigBase& config, const char* str, ConfigSubstitutionContext& substitutions)
#endif // ENABLE_FIX_SUPERSLICER_GCODE_IMPORT
{
if (str == nullptr)
return 0;