diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2020-01-17 16:16:12 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2020-01-17 16:16:12 +0300 |
commit | e8d52cfba1e025bb8b1d1ff4caa42354cccaf501 (patch) | |
tree | d8ed0c0a2f4aea3b6bdbf2c2be812131548086e6 /src/slic3r/GUI/3DBed.cpp | |
parent | 051fcd4e2459cb23df9e99e4b8465c9e6bee5402 (diff) | |
parent | 2259f7b3e8648b408e51d501ebe424a72f13c283 (diff) |
Fixed conflicts after merge with master
Diffstat (limited to 'src/slic3r/GUI/3DBed.cpp')
-rw-r--r-- | src/slic3r/GUI/3DBed.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/slic3r/GUI/3DBed.cpp b/src/slic3r/GUI/3DBed.cpp index 9e32df783..beb0a6577 100644 --- a/src/slic3r/GUI/3DBed.cpp +++ b/src/slic3r/GUI/3DBed.cpp @@ -335,24 +335,10 @@ void Bed3D::calc_gridlines(const ExPolygon& poly, const BoundingBox& bed_bbox) printf("Unable to create bed grid lines\n"); } -static const VendorProfile::PrinterModel* system_printer_model(const Preset &preset) -{ - const VendorProfile::PrinterModel *out = nullptr; - if (preset.vendor != nullptr) { - auto *printer_model = preset.config.opt<ConfigOptionString>("printer_model"); - 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; }); - if (it != preset.vendor->models.end()) - out = &(*it); - } - } - return out; -} - static std::string system_print_bed_model(const Preset &preset) { std::string out; - const VendorProfile::PrinterModel *pm = system_printer_model(preset); + const VendorProfile::PrinterModel *pm = PresetUtils::system_printer_model(preset); if (pm != nullptr && ! pm->bed_model.empty()) out = Slic3r::resources_dir() + "/profiles/" + preset.vendor->id + "/" + pm->bed_model; return out; @@ -361,7 +347,7 @@ static std::string system_print_bed_model(const Preset &preset) static std::string system_print_bed_texture(const Preset &preset) { std::string out; - const VendorProfile::PrinterModel *pm = system_printer_model(preset); + const VendorProfile::PrinterModel *pm = PresetUtils::system_printer_model(preset); if (pm != nullptr && ! pm->bed_texture.empty()) out = Slic3r::resources_dir() + "/profiles/" + preset.vendor->id + "/" + pm->bed_texture; return out; |