MM print : Fixed re-scaling of the Extruders column in the Object list

This commit is contained in:
YuSanka 2020-11-10 11:06:33 +01:00
parent 70b19d2f5d
commit e20d8f1623
2 changed files with 11 additions and 2 deletions

View file

@ -115,10 +115,15 @@ void ObjectDataViewModelNode::set_action_and_extruder_icons()
m_type & (itVolume | itLayer) ? "cog" : /*m_type & itInstance*/ "set_separate_obj";
m_action_icon = create_scaled_bitmap(m_action_icon_name); // FIXME: pass window ptr
// set extruder bitmap
set_extruder_icon();
}
void ObjectDataViewModelNode::set_extruder_icon()
{
if (m_type & itInstance)
return; // don't set colored bitmap for Instance
// set extruder bitmap
int extruder_idx = atoi(m_extruder.c_str());
if (extruder_idx > 0) --extruder_idx;
m_extruder_bmp = get_extruder_color_icon(extruder_idx);
@ -180,6 +185,8 @@ void ObjectDataViewModelNode::msw_rescale()
if (!m_opt_categories.empty())
update_settings_digest_bitmaps();
set_extruder_icon();
}
bool ObjectDataViewModelNode::SetValue(const wxVariant& variant, unsigned col)

View file

@ -209,8 +209,10 @@ public:
return true;
}
// Set action icons for node
// Set action and extruder(if any exist) icons for node
void set_action_and_extruder_icons();
// set extruder icon for node
void set_extruder_icon();
// Set printable icon for node
void set_printable_icon(PrintIndicator printable);