CLI: Fixed "query-printer-models".

If printer_technology options isn't used, then ALL installed printer models will be returned.
This commit is contained in:
YuSanka 2024-02-20 13:36:20 +01:00 committed by Lukas Matena
parent a46980ca47
commit ce910eb60a
2 changed files with 2 additions and 2 deletions

View File

@ -992,7 +992,7 @@ bool CLI::processed_profiles_sharing()
if (query_options.find(opt_key) != query_options.end())
continue;
if (opt_key == "query-printer-models") {
ret = Slic3r::get_json_printer_models(Preset::printer_technology(m_config));
ret = Slic3r::get_json_printer_models(get_printer_technology(m_config));
}
/*
else if (opt_key == "query-printer-profiles") {

View File

@ -199,7 +199,7 @@ static void add_printer_models(pt::ptree& vendor_node,
const PrinterPresetCollection& printer_presets)
{
for (const auto& printer_model : vendor_profile->models) {
if (printer_technology != ptAny && printer_model.technology != printer_technology)
if (printer_technology != ptUnknown && printer_model.technology != printer_technology)
continue;
pt::ptree variants_node;