mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-06 13:05:11 +08:00
Fixed object selection in right panel form the Scene by context menu
This commit is contained in:
parent
821ca0e36a
commit
a9ee4ff4b5
@ -2150,9 +2150,11 @@ void ObjectList::update_selections()
|
|||||||
if (GetSelectedItemsCount() == 1 && m_objects_model->GetItemType(GetSelection()) == itSettings )
|
if (GetSelectedItemsCount() == 1 && m_objects_model->GetItemType(GetSelection()) == itSettings )
|
||||||
{
|
{
|
||||||
const auto item = GetSelection();
|
const auto item = GetSelection();
|
||||||
if (selection.is_single_full_object() &&
|
if (selection.is_single_full_object()) {
|
||||||
m_objects_model->GetIdByItem(m_objects_model->GetParent(item)) == selection.get_object_idx())
|
if ( m_objects_model->GetIdByItem(m_objects_model->GetParent(item)) == selection.get_object_idx())
|
||||||
return;
|
return;
|
||||||
|
sels.Add(m_objects_model->GetItemById(selection.get_object_idx()));
|
||||||
|
}
|
||||||
if (selection.is_single_volume() || selection.is_any_modifier()) {
|
if (selection.is_single_volume() || selection.is_any_modifier()) {
|
||||||
const auto gl_vol = selection.get_volume(*selection.get_volume_idxs().begin());
|
const auto gl_vol = selection.get_volume(*selection.get_volume_idxs().begin());
|
||||||
if (m_objects_model->GetVolumeIdByItem(m_objects_model->GetParent(item)) == gl_vol->volume_idx())
|
if (m_objects_model->GetVolumeIdByItem(m_objects_model->GetParent(item)) == gl_vol->volume_idx())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user