From bdf4d5f41fcdd090422ba2f3d2d500cf89ffd580 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Fri, 4 Jan 2019 21:36:58 +0100 Subject: [PATCH] Fixed a crash when deleting several instances of one object --- src/slic3r/GUI/GLCanvas3D.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 2d57d5eb7..f81bec3b8 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -1894,8 +1894,6 @@ void GLCanvas3D::Selection::erase() } wxGetApp().obj_list()->delete_from_model_and_list(items); } - else if (is_single_full_instance()) - wxGetApp().obj_list()->delete_from_model_and_list(ItemType::itInstance, get_object_idx(), get_instance_idx()); else if (is_multiple_full_instance()) { std::set> instances_idxs; @@ -1915,6 +1913,8 @@ void GLCanvas3D::Selection::erase() } wxGetApp().obj_list()->delete_from_model_and_list(items); } + else if (is_single_full_instance()) + wxGetApp().obj_list()->delete_from_model_and_list(ItemType::itInstance, get_object_idx(), get_instance_idx()); else if (is_mixed()) { std::set items_set;