mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-12-05 19:27:57 -05:00
ObjectList: Fixes
* Fixed update of a warning icon for multi-part object, when some part with errors was deleted * Fixed a crash when selecting non-Object and non-Volume item (in get_mesh_errors_info() was missed check of the obj_idx) + Follow-up https://github.com/prusa3d/PrusaSlicer/commit/1cc7b4ba971e8d04558b8a49869d9ce1647b8f77 - some code refactoring: * fixed RepairedMeshErrors.merge() * get_mesh_errors_count() renamed to get_repaired_errors_count()
This commit is contained in:
1 parent
dbad87fb42
commit
7340488aaf
11 files changed
+83
-67
No files matched your search
@@ -1,5 +1,4 @@
|
||||
#include "GUI_ObjectManipulation.hpp"
|
||||
#include "GUI_ObjectList.hpp"
|
||||
#include "I18N.hpp"
|
||||
#include "BitmapComboBox.hpp"
|
||||
|
||||
@@ -132,7 +131,7 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
|
||||
return;
|
||||
|
||||
wxGetApp().obj_list()->fix_through_netfabb();
|
||||
update_warning_icon_state(wxGetApp().obj_list()->get_mesh_errors());
|
||||
update_warning_icon_state(wxGetApp().obj_list()->get_mesh_errors_info());
|
||||
});
|
||||
|
||||
sizer->Add(m_fix_throught_netfab_bitmap);
|
||||
@@ -781,12 +780,12 @@ void ObjectManipulation::update_item_name(const wxString& item_name)
|
||||
m_item_name->SetLabel(item_name);
|
||||
}
|
||||
|
||||
void ObjectManipulation::update_warning_icon_state(const std::pair<wxString, std::string>& warning)
|
||||
void ObjectManipulation::update_warning_icon_state(const MeshErrorsInfo& warning)
|
||||
{
|
||||
if (const std::string& warning_icon_name = warning.second;
|
||||
if (const std::string& warning_icon_name = warning.warning_icon_name;
|
||||
!warning_icon_name.empty())
|
||||
m_manifold_warning_bmp = ScalableBitmap(m_parent, warning_icon_name);
|
||||
const wxString& tooltip = warning.first;
|
||||
const wxString& tooltip = warning.tooltip;
|
||||
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);
|
||||
|
||||
Reference in new issue
Block a user