From 90beadb65f0841d2773d2def866adfd542fee6b2 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Mon, 17 Jun 2019 17:04:19 +0200 Subject: [PATCH] Check a possibility to load SLA project if there is at least one multi-part object on the bed --- src/slic3r/GUI/Plater.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index bdf249877..557b12377 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -1671,6 +1671,22 @@ std::vector Plater::priv::load_files(const std::vector& input_ if (load_config && !config_loaded.empty()) { // Based on the printer technology field found in the loaded config, select the base for the config, PrinterTechnology printer_technology = Preset::printer_technology(config_loaded); + + // We can't to load SLA project if there is at least one multi-part object on the bed + if (printer_technology == ptSLA) + { + const ModelObjectPtrs& objects = q->model().objects; + for (auto object : objects) + if (object->volumes.size() > 1) + { + Slic3r::GUI::show_info(nullptr, + _(L("You can't to load SLA project if there is at least one multi-part object on the bed")) + "\n\n" + + _(L("Please check your object list before preset changing.")), + _(L("Attention!"))); + return obj_idxs; + } + } + config.apply(printer_technology == ptFFF ? static_cast(FullPrintConfig::defaults()) : static_cast(SLAFullPrintConfig::defaults()));