Bugfix for extruders Column: suppress draw bitmap for Instance and allow Extruder editing for Layer Range
This commit is contained in:
parent
688a559b5f
commit
2afaefad24
1 changed files with 4 additions and 1 deletions
|
@ -579,6 +579,9 @@ void ObjectDataViewModelNode::set_action_and_extruder_icons()
|
||||||
m_type & (itVolume | itLayer) ? "cog" : /*m_type & itInstance*/ "set_separate_obj";
|
m_type & (itVolume | itLayer) ? "cog" : /*m_type & itInstance*/ "set_separate_obj";
|
||||||
m_action_icon = create_scaled_bitmap(nullptr, m_action_icon_name); // FIXME: pass window ptr
|
m_action_icon = create_scaled_bitmap(nullptr, m_action_icon_name); // FIXME: pass window ptr
|
||||||
|
|
||||||
|
if (m_type & itInstance)
|
||||||
|
return; // don't set colored bitmap for Instance
|
||||||
|
|
||||||
// set extruder bitmap
|
// set extruder bitmap
|
||||||
int extruder_idx = atoi(m_extruder.c_str());
|
int extruder_idx = atoi(m_extruder.c_str());
|
||||||
if (extruder_idx > 0) --extruder_idx;
|
if (extruder_idx > 0) --extruder_idx;
|
||||||
|
@ -2149,7 +2152,7 @@ wxWindow* BitmapChoiceRenderer::CreateEditorCtrl(wxWindow* parent, wxRect labelR
|
||||||
wxDataViewCtrl* const dv_ctrl = GetOwner()->GetOwner();
|
wxDataViewCtrl* const dv_ctrl = GetOwner()->GetOwner();
|
||||||
ObjectDataViewModel* const model = dynamic_cast<ObjectDataViewModel*>(dv_ctrl->GetModel());
|
ObjectDataViewModel* const model = dynamic_cast<ObjectDataViewModel*>(dv_ctrl->GetModel());
|
||||||
|
|
||||||
if (!(model->GetItemType(dv_ctrl->GetSelection()) & (itVolume | itObject)))
|
if (!(model->GetItemType(dv_ctrl->GetSelection()) & (itVolume | itLayer | itObject)))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
std::vector<wxBitmap*> icons = get_extruder_color_icons();
|
std::vector<wxBitmap*> icons = get_extruder_color_icons();
|
||||||
|
|
Loading…
Add table
Reference in a new issue