Improved XL printer detection when adding first object to the plate

This commit is contained in:
Lukas Matena 2023-06-09 07:56:00 +02:00
parent 7059adc6b8
commit 9949f85743
2 changed files with 2 additions and 2 deletions

View File

@ -2240,7 +2240,7 @@ namespace PresetUtils {
{ {
const VendorProfile::PrinterModel *out = nullptr; const VendorProfile::PrinterModel *out = nullptr;
if (preset.vendor != nullptr) { if (preset.vendor != nullptr) {
auto *printer_model = preset.config.opt<ConfigOptionString>("printer_model"); const auto *printer_model = preset.config.opt<ConfigOptionString>("printer_model");
if (printer_model != nullptr && ! printer_model->value.empty()) { if (printer_model != nullptr && ! printer_model->value.empty()) {
auto it = std::find_if(preset.vendor->models.begin(), preset.vendor->models.end(), [printer_model](const VendorProfile::PrinterModel &pm) { return pm.id == printer_model->value; }); auto it = std::find_if(preset.vendor->models.begin(), preset.vendor->models.end(), [printer_model](const VendorProfile::PrinterModel &pm) { return pm.id == printer_model->value; });
if (it != preset.vendor->models.end()) if (it != preset.vendor->models.end())

View File

@ -7696,7 +7696,7 @@ PlaterAfterLoadAutoArrange::PlaterAfterLoadAutoArrange()
Plater* plater = wxGetApp().plater(); Plater* plater = wxGetApp().plater();
m_enabled = plater->model().objects.empty() && m_enabled = plater->model().objects.empty() &&
plater->printer_technology() == ptFFF && plater->printer_technology() == ptFFF &&
plater->fff_print().config().printer_model.value == "XL"; is_XL_printer(plater->fff_print().config());
} }
PlaterAfterLoadAutoArrange::~PlaterAfterLoadAutoArrange() PlaterAfterLoadAutoArrange::~PlaterAfterLoadAutoArrange()