FIX: [STUDIO-3377] [STUDIO-3376] fix layer heigth ui
Change-Id: If0ac1282c450432bb234325ca1c1b952dd33cb89
This commit is contained in:
parent
06c2946a38
commit
fef36a931d
|
@ -44,8 +44,8 @@ void ObjectLayers::select_editor(LayerRangeEditor* editor, const bool is_last_ed
|
|||
#ifdef __WXOSX__
|
||||
wxTheApp->CallAfter([editor]() {
|
||||
#endif
|
||||
editor->SetFocus();
|
||||
editor->SelectAll();
|
||||
//editor->SetFocus();
|
||||
//editor->SelectAll();
|
||||
#ifdef __WXOSX__
|
||||
});
|
||||
#endif
|
||||
|
|
|
@ -382,7 +382,8 @@ void ObjectList::create_objects_ctrl()
|
|||
return m_objects_model->GetDefaultExtruderIdx(GetSelection());
|
||||
});
|
||||
bmp_choice_renderer->set_has_default_extruder([this]() {
|
||||
return m_objects_model->GetVolumeType(GetSelection()) == ModelVolumeType::PARAMETER_MODIFIER;
|
||||
return m_objects_model->GetVolumeType(GetSelection()) == ModelVolumeType::PARAMETER_MODIFIER ||
|
||||
m_objects_model->GetItemType(GetSelection()) == itLayer;
|
||||
});
|
||||
AppendColumn(new wxDataViewColumn(_L("Fila."), bmp_choice_renderer,
|
||||
colFilament, m_columns_width[colFilament] * em, wxALIGN_CENTER_HORIZONTAL, 0));
|
||||
|
@ -2968,7 +2969,7 @@ DynamicPrintConfig ObjectList::get_default_layer_config(const int obj_idx)
|
|||
int extruder = object(obj_idx)->config.has("extruder") ?
|
||||
object(obj_idx)->config.opt_int("extruder") :
|
||||
wxGetApp().preset_bundle->prints.get_edited_preset().config.opt_float("extruder");
|
||||
config.set_key_value("extruder", new ConfigOptionInt(extruder));
|
||||
config.set_key_value("extruder", new ConfigOptionInt(0));
|
||||
|
||||
return config;
|
||||
}
|
||||
|
@ -5614,6 +5615,9 @@ void ObjectList::set_extruder_for_selected_items(const int extruder)
|
|||
}
|
||||
}
|
||||
|
||||
if (type & itLayerRoot)
|
||||
continue;
|
||||
|
||||
ModelConfig& config = get_item_config(item);
|
||||
if (config.has("extruder"))
|
||||
config.set("extruder", extruder);
|
||||
|
|
|
@ -375,6 +375,10 @@ void ObjectDataViewModelNode::UpdateExtruderAndColorIcon(wxString extruder /*= "
|
|||
m_extruder_bmp = *get_default_extruder_color_icon();
|
||||
return;
|
||||
}
|
||||
else if (m_type & itLayer) {
|
||||
m_extruder_bmp = *get_default_extruder_color_icon();
|
||||
return;
|
||||
}
|
||||
else {
|
||||
m_extruder_bmp = wxNullBitmap;
|
||||
return;
|
||||
|
|
|
@ -1304,7 +1304,8 @@ std::vector<int> PartPlate::get_extruders(bool conside_custom_gcode) const
|
|||
// layer range
|
||||
for (auto layer_range : mo->layer_config_ranges) {
|
||||
if (layer_range.second.has("extruder")) {
|
||||
plate_extruders.push_back(layer_range.second.option("extruder")->getInt());
|
||||
if (auto id = layer_range.second.option("extruder")->getInt(); id > 0)
|
||||
plate_extruders.push_back(id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue