Improvements for statistics information:

+ Show 2 groups of errors: "Auto-repared" and "Remaning".
 + Use different icons for volumes with/without remaining errors
 + Fixed update of the ObjectList warnings icons after switch the color mode of a PrusaSlicer
 + Some code refactoring: Use same code for tooltips for "exclamation"-icon from an ObjectList and from a Sidebar->ObjectInfo
This commit is contained in:
YuSanka 2021-09-21 17:18:12 +02:00
parent a5a7f64db0
commit 238e65e455
11 changed files with 163 additions and 82 deletions

View file

@ -132,7 +132,7 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
return;
wxGetApp().obj_list()->fix_through_netfabb();
update_warning_icon_state(wxGetApp().obj_list()->get_mesh_errors_list());
update_warning_icon_state(wxGetApp().obj_list()->get_mesh_errors());
});
sizer->Add(m_fix_throught_netfab_bitmap);
@ -776,8 +776,12 @@ void ObjectManipulation::update_item_name(const wxString& item_name)
m_item_name->SetLabel(item_name);
}
void ObjectManipulation::update_warning_icon_state(const wxString& tooltip)
{
void ObjectManipulation::update_warning_icon_state(const std::pair<wxString, std::string>& warning)
{
if (const std::string& warning_icon_name = warning.second;
!warning_icon_name.empty())
m_manifold_warning_bmp = ScalableBitmap(m_parent, warning_icon_name);
const wxString& tooltip = warning.first;
m_fix_throught_netfab_bitmap->SetBitmap(tooltip.IsEmpty() ? wxNullBitmap : m_manifold_warning_bmp.bmp());
m_fix_throught_netfab_bitmap->SetMinSize(tooltip.IsEmpty() ? wxSize(0,0) : m_manifold_warning_bmp.bmp().GetSize());
m_fix_throught_netfab_bitmap->SetToolTip(tooltip);