mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-26 02:11:18 +00:00
Fix broken editing of filament in device
This commit is contained in:
@@ -378,16 +378,9 @@ wxString MachineObject::get_printer_type_display_str() const
|
||||
{
|
||||
std::string display_name = DevPrinterConfigUtil::get_printer_display_name(printer_type);
|
||||
|
||||
// Bambu printers use m_resource_file_path + "/printers/" + type_str + ".json", which is a semantic that only works for their profiles.
|
||||
// For any other profile, we can simply consult preset bundle if the model_id exists.
|
||||
if (display_name.empty()) {
|
||||
for (const auto& [vendor_id, vendor] : GUI::wxGetApp().preset_bundle->vendors) {
|
||||
for (const auto& model : vendor.models) {
|
||||
if (printer_type == model.model_id)
|
||||
display_name = model.name;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Bambu names come from Bambu configs; other vendors resolve through preset model IDs.
|
||||
if (display_name.empty() && GUI::wxGetApp().preset_bundle)
|
||||
display_name = GUI::wxGetApp().preset_bundle->get_printer_model_display_name(printer_type);
|
||||
|
||||
if (!display_name.empty())
|
||||
return display_name;
|
||||
|
||||
Reference in New Issue
Block a user