Added "last_extrusion_role" placeholder for extrusion role changes

so that changes made for the extrusion role can be undone when the
extrusion role changes again.
This commit is contained in:
clearchris 2020-11-02 17:18:20 -05:00 committed by Merill
parent 8fe54ffe2c
commit f7bf94840a

View File

@ -4221,6 +4221,7 @@ std::string GCode::_before_extrude(const ExtrusionPath &path, const std::string
if (path.role() != m_last_extrusion_role && !m_config.feature_gcode.value.empty()) {
DynamicConfig config;
config.set_key_value("extrusion_role", new ConfigOptionString(extrusion_role_to_string_for_parser(path.role())));
config.set_key_value("last_extrusion_role", new ConfigOptionString(extrusion_role_to_string_for_parser(m_last_extrusion_role)));
config.set_key_value("layer_num", new ConfigOptionInt(m_layer_index + 1));
config.set_key_value("layer_z", new ConfigOptionFloat(m_config.z_offset.value));
gcode += this->placeholder_parser_process("feature_gcode",