From 4575443c4c2902ba9c997d1c1b3f289a71ea7d16 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Fri, 23 Nov 2018 11:54:06 +0100 Subject: [PATCH] Fixed bug with last solid part deleting + fixed building + deleted last ";" from the settings digest --- src/slic3r/GUI/GUI_ObjectList.cpp | 7 ++++--- src/slic3r/GUI/GUI_ObjectManipulation.hpp | 1 + src/slic3r/GUI/wxExtensions.cpp | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index 3cfcdad0f..8d6487de7 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -333,7 +333,7 @@ void ObjectList::key_event(wxKeyEvent& event) printf("WXK_BACK\n"); remove(); } - else if (wxGetKeyState(wxKeyCode('A')) && wxGetKeyState(WXK_CONTROL)) + else if (wxGetKeyState(wxKeyCode('A')) && wxGetKeyState(WXK_SHIFT)) select_item_all_children(); else event.Skip(); @@ -1230,7 +1230,8 @@ void ObjectList::delete_from_model_and_list(const std::vector& it m_objects_model->Delete(m_objects_model->GetItemById(item->obj_idx)); } else { - del_subobject_from_object(item->obj_idx, item->sub_obj_idx, item->type); + if (!del_subobject_from_object(item->obj_idx, item->sub_obj_idx, item->type)) + continue; if (item->type&itVolume) { m_objects_model->Delete(m_objects_model->GetItemByVolumeId(item->obj_idx, item->sub_obj_idx)); @@ -1305,7 +1306,7 @@ void ObjectList::remove() for (auto& item : sels) { if (m_objects_model->GetParent(item) == wxDataViewItem(0)) - wxGetApp().plater()->remove(m_objects_model->GetIdByItem(item)); + delete_from_model_and_list(itObject, m_objects_model->GetIdByItem(item), -1); else del_subobject_item(item); } diff --git a/src/slic3r/GUI/GUI_ObjectManipulation.hpp b/src/slic3r/GUI/GUI_ObjectManipulation.hpp index c67ac089c..3a8df4111 100644 --- a/src/slic3r/GUI/GUI_ObjectManipulation.hpp +++ b/src/slic3r/GUI/GUI_ObjectManipulation.hpp @@ -6,6 +6,7 @@ #include "GUI_ObjectSettings.hpp" #include "GLCanvas3D.hpp" +class wxStaticText; namespace Slic3r { namespace GUI { diff --git a/src/slic3r/GUI/wxExtensions.cpp b/src/slic3r/GUI/wxExtensions.cpp index b80976e65..dc17bed6b 100644 --- a/src/slic3r/GUI/wxExtensions.cpp +++ b/src/slic3r/GUI/wxExtensions.cpp @@ -410,6 +410,8 @@ bool PrusaObjectDataViewModelNode::update_settings_digest(const std::vectorfind(m_name.ToStdString()); if (bmp == nullptr) {