diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index 28053971f34..c969b95da86 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -3909,6 +3909,8 @@ void ObjectList::toggle_printable_state() { wxDataViewItemArray sels; GetSelections(sels); + if (sels.IsEmpty()) + return; wxDataViewItem frst_item = sels[0]; diff --git a/src/slic3r/GUI/ObjectDataViewModel.cpp b/src/slic3r/GUI/ObjectDataViewModel.cpp index 49c75f9f2f6..297d8e3c9b5 100644 --- a/src/slic3r/GUI/ObjectDataViewModel.cpp +++ b/src/slic3r/GUI/ObjectDataViewModel.cpp @@ -1180,6 +1180,15 @@ int ObjectDataViewModel::GetExtruderNumber(const wxDataViewItem& item) const return atoi(node->m_extruder.c_str()); } +wxString ObjectDataViewModel::GetColumnType(unsigned int col) const +{ + if (col == colName || col == colExtruder) + return wxT("DataViewBitmapText"); + if (col == colPrint || col == colEditing) + return wxT("DataViewBitmap"); + return wxT("string"); +} + void ObjectDataViewModel::GetValue(wxVariant &variant, const wxDataViewItem &item, unsigned int col) const { wxASSERT(item.IsOk()); diff --git a/src/slic3r/GUI/ObjectDataViewModel.hpp b/src/slic3r/GUI/ObjectDataViewModel.hpp index 1dd41bb1079..93e092fc265 100644 --- a/src/slic3r/GUI/ObjectDataViewModel.hpp +++ b/src/slic3r/GUI/ObjectDataViewModel.hpp @@ -316,7 +316,7 @@ class ObjectDataViewModel :public wxDataViewModel // helper methods to change the model unsigned int GetColumnCount() const override { return 3;} - wxString GetColumnType(unsigned int col) const override{ return wxT("string"); } + wxString GetColumnType(unsigned int col) const override; void GetValue( wxVariant &variant, const wxDataViewItem &item,