From b6f1a8e8db194959b293f3f013209bb4a361b341 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Wed, 12 Jun 2024 19:42:51 +0200 Subject: [PATCH] Only allow loading of printRequest in SLA mode (to prevent a crash) --- src/slic3r/GUI/Plater.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 44a72c8d63..accd89f36a 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -1202,6 +1202,13 @@ std::vector Plater::priv::load_files(const std::vector& input_ const bool type_prusa = std::regex_match(path.string(), pattern_prusa); const bool type_printRequest = std::regex_match(path.string(), pattern_printRequest); + if (type_printRequest && printer_technology != ptSLA) { + Slic3r::GUI::show_info(nullptr, + _L("PrintRequest can only be loaded if an SLA printer is selected."), + _L("Error!")); + continue; + } + Slic3r::Model model; bool is_project_file = type_prusa; try {