mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 19:35:57 +08:00
Code refactoring for ObjectList::get_selection_indexes().
Assert is changed to check if selection isn't empty. Elsewhere processing of the empty selection can causes a crash.
This commit is contained in:
parent
baee1671ef
commit
14749d3c73
@ -349,7 +349,8 @@ void ObjectList::get_selection_indexes(std::vector<int>& obj_idxs, std::vector<i
|
||||
{
|
||||
wxDataViewItemArray sels;
|
||||
GetSelections(sels);
|
||||
assert(!sels.IsEmpty());
|
||||
if (sels.IsEmpty())
|
||||
return;
|
||||
|
||||
if ( m_objects_model->GetItemType(sels[0]) & itVolume ||
|
||||
(sels.Count()==1 && m_objects_model->GetItemType(m_objects_model->GetParent(sels[0])) & itVolume) ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user