mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 06:57:36 -06:00
Fix model load in debug build (#4656)
* Fix model load in debug build Debug build exit with error on model load due to failed assertion (file path redacted): orca-slicer: <...>/OrcaSlicer/src/libslic3r/Model.cpp:1361: void Slic3r::ModelObject::update_min_max_z(): Assertion `! this->instances.empty()' failed. Assertion failed due to model->ensure_on_bed() being called for object which yet to be load from file. Do not call ensure_on_bed() for models read from file since they may be read with no default instance. ensure_on_bed() called later within withing Plater::load_model_objects() for each object added. * Rework according to code review comment
This commit is contained in:
parent
9d81245eff
commit
ff7faca943
1 changed files with 2 additions and 1 deletions
|
@ -4056,7 +4056,8 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
|||
return empty_result;
|
||||
}
|
||||
|
||||
model_object->ensure_on_bed(is_project_file);
|
||||
if (!model_object->instances.empty())
|
||||
model_object->ensure_on_bed(is_project_file);
|
||||
}
|
||||
|
||||
tolal_model_count += model_idx;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue