NEW: [4073] create new nozzle for exist printer

Jira: STUDIO-4073

Change-Id: Idee8067faf96d75cdf20928559c05debcf9b3f3b
This commit is contained in:
maosheng.wei
2023-11-09 10:09:10 +08:00
committed by Lane.Wei
parent 00e9062e15
commit adbed9c88d
5 changed files with 295 additions and 147 deletions
+5 -3
View File
@@ -1324,8 +1324,8 @@ std::pair<PresetsConfigSubstitutions, std::string> PresetBundle::load_system_fil
VendorProfile PresetBundle::get_custom_vendor_models() const
{
VendorProfile vendor;
vendor.name = "Custom";
vendor.id = "Custom";
vendor.name = PRESET_CUSTOM_VENDOR;
vendor.id = PRESET_CUSTOM_VENDOR;
for (auto &preset : printers.get_presets()) {
if (preset.is_system) continue;
if (printers.get_preset_base(preset) != &preset) continue;
@@ -1336,7 +1336,9 @@ VendorProfile PresetBundle::get_custom_vendor_models() const
});
if (iter_model == vendor.models.end()) {
iter_model = vendor.models.emplace(vendor.models.end(), VendorProfile::PrinterModel{});
iter_model->name = model;
iter_model->id = model;
iter_model->name = model;
iter_model->variants = {VendorProfile::PrinterVariant(variant)};
}
}
return vendor;