Small refactoring -> GLGizmosManager gets model from selection and not from canvas
This commit is contained in:
parent
702186eec3
commit
9b3f1a8942
@ -465,7 +465,6 @@ public:
|
||||
void set_config(const DynamicPrintConfig* config);
|
||||
void set_process(BackgroundSlicingProcess* process);
|
||||
void set_model(Model* model);
|
||||
Model* get_model() { return m_model; }
|
||||
|
||||
const Selection& get_selection() const { return m_selection; }
|
||||
Selection& get_selection() { return m_selection; }
|
||||
|
@ -278,7 +278,7 @@ void GLGizmosManager::update_data(GLCanvas3D& canvas)
|
||||
const GLVolume* volume = selection.get_volume(*selection.get_volume_idxs().begin());
|
||||
set_scale(volume->get_instance_scaling_factor());
|
||||
set_rotation(Vec3d::Zero());
|
||||
ModelObject* model_object = canvas.get_model()->objects[selection.get_object_idx()];
|
||||
ModelObject* model_object = selection.get_model()->objects[selection.get_object_idx()];
|
||||
set_flattening_data(model_object);
|
||||
set_sla_support_data(model_object, selection);
|
||||
}
|
||||
@ -294,7 +294,7 @@ void GLGizmosManager::update_data(GLCanvas3D& canvas)
|
||||
{
|
||||
set_scale(Vec3d::Ones());
|
||||
set_rotation(Vec3d::Zero());
|
||||
set_flattening_data(selection.is_from_single_object() ? canvas.get_model()->objects[selection.get_object_idx()] : nullptr);
|
||||
set_flattening_data(selection.is_from_single_object() ? selection.get_model()->objects[selection.get_object_idx()] : nullptr);
|
||||
set_sla_support_data(nullptr, selection);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user