mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-03-01 07:44:41 -07:00
FIX: always show select nozzle type notice
jira: [STUDIO-9151] Change-Id: I432beaa11c0a776ca214cbfc675227f95837b426 (cherry picked from commit 6587ac01b83268982a049b5ac0c45f8aac2b3f5d)
This commit is contained in:
parent
81e57f3d8d
commit
09a8ccaa18
3 changed files with 24 additions and 5 deletions
|
|
@ -1135,14 +1135,19 @@ void AMSMaterialsSetting::on_select_filament(wxCommandEvent &evt)
|
|||
};
|
||||
|
||||
int extruder_id = obj->get_extruder_id_by_ams_id(std::to_string(ams_id));
|
||||
NozzleVolumeType nozzle_volume_type = NozzleVolumeType::nvtStandard;
|
||||
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);
|
||||
if (obj->is_nozzle_flow_type_supported() && (obj->get_nozzle_flow_type(extruder_id) == NozzleFlowType::NONE_FLOWTYPE))
|
||||
{
|
||||
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();
|
||||
}
|
||||
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) {
|
||||
// add default item
|
||||
PACalibResult default_item;
|
||||
|
|
|
|||
|
|
@ -5428,6 +5428,16 @@ std::string MachineObject::get_string_from_fantype(int type)
|
|||
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)
|
||||
{
|
||||
m_air_duct_data.modes.clear();
|
||||
|
|
|
|||
|
|
@ -743,6 +743,10 @@ public:
|
|||
int big_fan2_speed = 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
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue