mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 11:53:48 +00:00
FIX:Fix array out of bounds switch between coloring and text tools
jira: STUDIO-13303 Change-Id: Ic80224dc371247c4571a2f5471b68c011344621b (cherry picked from commit 0ac418508c86709cd91b18268a1b33d209008f3d) (cherry picked from commit b7f9cd292cb352891045f4b26924669ba0252231)
This commit is contained in:
@@ -6129,7 +6129,9 @@ void ObjectList::update_after_undo_redo()
|
|||||||
wxDataViewItemArray ObjectList::reorder_volumes_and_get_selection(int obj_idx, std::function<bool(const ModelVolume*)> add_to_selection/* = nullptr*/)
|
wxDataViewItemArray ObjectList::reorder_volumes_and_get_selection(int obj_idx, std::function<bool(const ModelVolume*)> add_to_selection/* = nullptr*/)
|
||||||
{
|
{
|
||||||
wxDataViewItemArray items;
|
wxDataViewItemArray items;
|
||||||
|
if (obj_idx < 0 || obj_idx >= m_objects->size()) {
|
||||||
|
return items;
|
||||||
|
}
|
||||||
ModelObject* object = (*m_objects)[obj_idx];
|
ModelObject* object = (*m_objects)[obj_idx];
|
||||||
if (object->volumes.size() <= 1)
|
if (object->volumes.size() <= 1)
|
||||||
return items;
|
return items;
|
||||||
|
|||||||
Reference in New Issue
Block a user