write correct extruder_colour to gcode

fixes #6288
This commit is contained in:
SoftFever 2024-08-02 21:40:03 +08:00
parent c5d417ed89
commit 68945e07e8

View file

@ -4365,6 +4365,8 @@ void GCode::append_full_config(const Print &print, std::string &str)
if (key == "wipe_tower_x" || key == "wipe_tower_y") {
ss << std::fixed << std::setprecision(3) << "; " << key << " = " << dynamic_cast<const ConfigOptionFloats*>(cfg.option(key))->get_at(print.get_plate_index()) << "\n";
}
if(key == "extruder_colour")
ss << "; " << key << " = " << cfg.opt_serialize("filament_colour") << "\n";
else
ss << "; " << key << " = " << cfg.opt_serialize(key) << "\n";
}