Activate existing projects after loading AMF/3MF/Config: Initial implementation.

This commit is contained in:
bubnikv 2018-06-22 14:17:03 +02:00
parent 8abe1b3633
commit 082ed95a94
4 changed files with 76 additions and 16 deletions

View file

@ -1415,11 +1415,12 @@ void GCode::append_full_config(const Print& print, std::string& str)
for (size_t i = 0; i < sizeof(configs) / sizeof(configs[0]); ++i) {
const StaticPrintConfig *cfg = configs[i];
for (const std::string &key : cfg->keys())
{
if (key != "compatible_printers")
str += "; " + key + " = " + cfg->serialize(key) + "\n";
}
}
const DynamicConfig &full_config = print.placeholder_parser.config();
for (const char *key : { "print_settings_id", "filament_settings_id", "printer_settings_id" })
str += std::string("; ") + key + " = " + full_config.serialize(key) + "\n";
}
void GCode::set_extruders(const std::vector<unsigned int> &extruder_ids)