mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 00:37:51 -06:00
Instance selection in object list according to the canvas selection
This commit is contained in:
parent
0810beae77
commit
95af5c7cc6
3 changed files with 51 additions and 10 deletions
|
@ -1198,11 +1198,18 @@ void ObjectList::update_selections()
|
|||
auto& selection = _3DScene::get_canvas(wxGetApp().canvas3D())->get_selection();
|
||||
wxDataViewItemArray sels;
|
||||
|
||||
for (auto idx: selection.get_volume_idxs())
|
||||
{
|
||||
const auto gl_vol = selection.get_volume(idx);
|
||||
sels.Add(m_objects_model->GetItemByVolumeId(gl_vol->object_idx(), gl_vol->volume_idx()));
|
||||
if (selection.is_single_full_object()) {
|
||||
for (auto idx : selection.get_volume_idxs()) {
|
||||
const auto gl_vol = selection.get_volume(idx);
|
||||
sels.Add(m_objects_model->GetItemByVolumeId(gl_vol->object_idx(), gl_vol->volume_idx()));
|
||||
}
|
||||
}
|
||||
else if (selection.is_single_full_instance()) {
|
||||
for (auto idx : selection.get_instance_idxs()) {
|
||||
sels.Add(m_objects_model->GetItemByInstanceId(selection.get_object_idx(), idx));
|
||||
}
|
||||
}
|
||||
|
||||
select_items(sels);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue