Tech ENABLE_SAVE_COMMANDS_ALWAYS_ENABLED -> 1st installment: Allow to save/load empty projects
This commit is contained in:
parent
dfd946e7c9
commit
dbaaa35534
6 changed files with 43 additions and 2 deletions
src/libslic3r
|
@ -161,8 +161,10 @@ Model Model::read_from_archive(const std::string& input_file, DynamicPrintConfig
|
|||
if (!result)
|
||||
throw Slic3r::RuntimeError("Loading of a model file failed.");
|
||||
|
||||
#if !ENABLE_SAVE_COMMANDS_ALWAYS_ENABLED
|
||||
if (model.objects.empty())
|
||||
throw Slic3r::RuntimeError("The supplied file couldn't be read because it's empty");
|
||||
#endif // !ENABLE_SAVE_COMMANDS_ALWAYS_ENABLED
|
||||
|
||||
for (ModelObject *o : model.objects)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue