From 2b602e8fdfbebc7b54c1117f69aec4fa828082cc Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Wed, 2 Apr 2025 17:10:47 +0200 Subject: [PATCH] SPE-2736: Fixed loading of empty project --- src/libslic3r/FileReader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/FileReader.cpp b/src/libslic3r/FileReader.cpp index d9d75b5edd..6cc07d9c36 100644 --- a/src/libslic3r/FileReader.cpp +++ b/src/libslic3r/FileReader.cpp @@ -70,7 +70,7 @@ static Model read_model_from_file(const std::string& input_file, LoadAttributes if (!result) throw Slic3r::RuntimeError(L("Loading of a model file failed.")); - if (model.objects.empty()) + if (model.objects.empty() && temp_config.empty()) throw Slic3r::RuntimeError(L("The supplied file couldn't be read because it's empty")); if (!boost::ends_with(input_file, ".printRequest")) @@ -105,7 +105,7 @@ static Model read_all_from_file(const std::string& input_file, if (!result) throw Slic3r::RuntimeError(L("Loading of a model file failed.")); - if (model.objects.empty()) + if (model.objects.empty() && config->empty()) throw Slic3r::RuntimeError(L("The supplied file couldn't be read because it's empty")); for (ModelObject* o : model.objects)