mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-06-04 11:14:17 +08:00
SPE-2736: Fixed loading of empty project
This commit is contained in:
parent
227fce631a
commit
2b602e8fdf
@ -70,7 +70,7 @@ static Model read_model_from_file(const std::string& input_file, LoadAttributes
|
|||||||
if (!result)
|
if (!result)
|
||||||
throw Slic3r::RuntimeError(L("Loading of a model file failed."));
|
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"));
|
throw Slic3r::RuntimeError(L("The supplied file couldn't be read because it's empty"));
|
||||||
|
|
||||||
if (!boost::ends_with(input_file, ".printRequest"))
|
if (!boost::ends_with(input_file, ".printRequest"))
|
||||||
@ -105,7 +105,7 @@ static Model read_all_from_file(const std::string& input_file,
|
|||||||
if (!result)
|
if (!result)
|
||||||
throw Slic3r::RuntimeError(L("Loading of a model file failed."));
|
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"));
|
throw Slic3r::RuntimeError(L("The supplied file couldn't be read because it's empty"));
|
||||||
|
|
||||||
for (ModelObject* o : model.objects)
|
for (ModelObject* o : model.objects)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user