mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Implemented update on canvas of a printable state for new volumes added from ObjectList
This commit is contained in:
parent
9b5a577c07
commit
4152a5df43
4 changed files with 38 additions and 5 deletions
|
@ -1320,6 +1320,23 @@ void GLCanvas3D::toggle_model_objects_visibility(bool visible, const ModelObject
|
|||
_set_warning_texture(WarningTexture::SomethingNotShown, false);
|
||||
}
|
||||
|
||||
void GLCanvas3D::update_instance_printable_state_for_objects(std::vector<size_t>& object_idxs)
|
||||
{
|
||||
for (size_t obj_idx : object_idxs)
|
||||
{
|
||||
ModelObject* model_object = m_model->objects[obj_idx];
|
||||
for (int inst_idx = 0; inst_idx < model_object->instances.size(); inst_idx++)
|
||||
{
|
||||
ModelInstance* instance = model_object->instances[inst_idx];
|
||||
|
||||
for (GLVolume* volume : m_volumes.volumes)
|
||||
{
|
||||
if ((volume->object_idx() == obj_idx) && (volume->instance_idx() == inst_idx))
|
||||
volume->printable = instance->printable;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GLCanvas3D::set_config(const DynamicPrintConfig* config)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue