Fixed bug with last solid part deleting
+ fixed building + deleted last ";" from the settings digest
This commit is contained in:
parent
a05bda5347
commit
4575443c4c
@ -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<ItemForDelete>& 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);
|
||||
}
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include "GUI_ObjectSettings.hpp"
|
||||
#include "GLCanvas3D.hpp"
|
||||
|
||||
class wxStaticText;
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
@ -410,6 +410,8 @@ bool PrusaObjectDataViewModelNode::update_settings_digest(const std::vector<std:
|
||||
|
||||
for (auto& cat : m_opt_categories)
|
||||
m_name += cat + "; ";
|
||||
if (!m_name.IsEmpty())
|
||||
m_name.erase(m_name.Length()-2, 2); // Delete last "; "
|
||||
|
||||
wxBitmap *bmp = m_bitmap_cache->find(m_name.ToStdString());
|
||||
if (bmp == nullptr) {
|
||||
|
Loading…
Reference in New Issue
Block a user