FIX: always show select nozzle type notice
jira: [STUDIO-9151] Change-Id: I432beaa11c0a776ca214cbfc675227f95837b426
This commit is contained in:
parent
0f98abde37
commit
6587ac01b8
|
@ -146,7 +146,7 @@ void AMSMaterialsSetting::create_panel_normal(wxWindow* parent)
|
||||||
|
|
||||||
m_sizer_filament->Add(m_comboBox_filament, 1, wxALIGN_CENTER, 0);
|
m_sizer_filament->Add(m_comboBox_filament, 1, wxALIGN_CENTER, 0);
|
||||||
|
|
||||||
// make the style the same with disable m_input_k_val£¬ FIXME
|
// make the style the same with disable m_input_k_val, FIXME
|
||||||
m_readonly_filament = new TextInput(parent, wxEmptyString, "", "", wxDefaultPosition, AMS_MATERIALS_SETTING_COMBOX_WIDTH, wxTE_CENTRE | wxTE_PROCESS_ENTER);
|
m_readonly_filament = new TextInput(parent, wxEmptyString, "", "", wxDefaultPosition, AMS_MATERIALS_SETTING_COMBOX_WIDTH, wxTE_CENTRE | wxTE_PROCESS_ENTER);
|
||||||
m_readonly_filament->SetBorderColor(StateColor(std::make_pair(0xDBDBDB, (int)StateColor::Focused), std::make_pair(0x00AE42, (int)StateColor::Hovered),
|
m_readonly_filament->SetBorderColor(StateColor(std::make_pair(0xDBDBDB, (int)StateColor::Focused), std::make_pair(0x00AE42, (int)StateColor::Hovered),
|
||||||
std::make_pair(0xDBDBDB, (int)StateColor::Normal)));
|
std::make_pair(0xDBDBDB, (int)StateColor::Normal)));
|
||||||
|
@ -1166,14 +1166,19 @@ void AMSMaterialsSetting::on_select_filament(wxCommandEvent &evt)
|
||||||
};
|
};
|
||||||
|
|
||||||
int extruder_id = obj->get_extruder_id_by_ams_id(std::to_string(ams_id));
|
int extruder_id = obj->get_extruder_id_by_ams_id(std::to_string(ams_id));
|
||||||
NozzleVolumeType nozzle_volume_type = NozzleVolumeType::nvtStandard;
|
if (obj->is_nozzle_flow_type_supported() && (obj->get_nozzle_flow_type(extruder_id) == NozzleFlowType::NONE_FLOWTYPE))
|
||||||
if (obj->m_extder_data.extders[extruder_id].current_nozzle_flow_type == NozzleFlowType::NONE_FLOWTYPE) {
|
{
|
||||||
MessageDialog dlg(nullptr, _L("There are unset nozzle types. Please set the nozzle types of all extruders before synchronizing."), _L("Warning"), wxICON_WARNING | wxOK);
|
MessageDialog dlg(nullptr, _L("The nozzle flow is not set. Please set the nozzle flow rate before editing the filament.\n'Device -> Print parts'"), _L("Warning"), wxICON_WARNING | wxOK);
|
||||||
dlg.ShowModal();
|
dlg.ShowModal();
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
nozzle_volume_type = NozzleVolumeType(obj->m_extder_data.extders[extruder_id].current_nozzle_flow_type - 1);
|
NozzleFlowType nozzle_flow_type = obj->get_nozzle_flow_type(extruder_id);
|
||||||
|
NozzleVolumeType nozzle_volume_type = NozzleVolumeType::nvtStandard;
|
||||||
|
if (nozzle_flow_type != NozzleFlowType::NONE_FLOWTYPE)
|
||||||
|
{
|
||||||
|
nozzle_volume_type = NozzleVolumeType(nozzle_flow_type - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (obj->cali_version >= 0) {
|
if (obj->cali_version >= 0) {
|
||||||
// add default item
|
// add default item
|
||||||
PACalibResult default_item;
|
PACalibResult default_item;
|
||||||
|
|
|
@ -5380,6 +5380,16 @@ std::string MachineObject::get_string_from_fantype(int type)
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NozzleFlowType MachineObject::get_nozzle_flow_type(int extruder_id) const
|
||||||
|
{
|
||||||
|
if (is_nozzle_flow_type_supported() && m_extder_data.extders.size() > extruder_id)
|
||||||
|
{
|
||||||
|
return m_extder_data.extders[extruder_id].current_nozzle_flow_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NozzleFlowType::NONE_FLOWTYPE;
|
||||||
|
}
|
||||||
|
|
||||||
void MachineObject::converse_to_duct(bool is_suppt_part_fun, bool is_suppt_aux_fun, bool is_suppt_cham_fun)
|
void MachineObject::converse_to_duct(bool is_suppt_part_fun, bool is_suppt_aux_fun, bool is_suppt_cham_fun)
|
||||||
{
|
{
|
||||||
m_air_duct_data.modes.clear();
|
m_air_duct_data.modes.clear();
|
||||||
|
|
|
@ -731,6 +731,10 @@ public:
|
||||||
int big_fan2_speed = 0;
|
int big_fan2_speed = 0;
|
||||||
uint32_t fan_gear = 0;
|
uint32_t fan_gear = 0;
|
||||||
|
|
||||||
|
/*extruder*/
|
||||||
|
[[nodiscard]] bool is_nozzle_flow_type_supported() const { return is_enable_np; };
|
||||||
|
[[nodiscard]] NozzleFlowType get_nozzle_flow_type(int extruder_id) const;
|
||||||
|
|
||||||
//new fan data
|
//new fan data
|
||||||
AirDuctData m_air_duct_data;
|
AirDuctData m_air_duct_data;
|
||||||
void converse_to_duct(bool is_suppt_part_fun, bool is_suppt_aux_fun, bool is_suppt_cham_fun); // Convert the data to duct type to make the newand old protocols consistent
|
void converse_to_duct(bool is_suppt_part_fun, bool is_suppt_aux_fun, bool is_suppt_cham_fun); // Convert the data to duct type to make the newand old protocols consistent
|
||||||
|
|
Loading…
Reference in New Issue