mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 13:47:59 -06:00
Added method const GLVolume* Selection::get_first_volume() const to simplify client code
(cherry picked from commit prusa3d/PrusaSlicer@0e3490620e)
This commit is contained in:
parent
9dbb2dfe0d
commit
049dfd3e08
9 changed files with 29 additions and 30 deletions
|
@ -119,7 +119,7 @@ void SelectionInfo::on_update()
|
|||
const Selection& selection = get_pool()->get_canvas()->get_selection();
|
||||
if (selection.is_single_full_instance()) {
|
||||
m_model_object = selection.get_model()->objects[selection.get_object_idx()];
|
||||
m_z_shift = selection.get_volume(*selection.get_volume_idxs().begin())->get_sla_shift_z();
|
||||
m_z_shift = selection.get_first_volume()->get_sla_shift_z();
|
||||
}
|
||||
else
|
||||
m_model_object = nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue