FIX: the nozzle type sync status is incorrect for P/A printers

jira: STUDIO-12310
Change-Id: I7a01bcfdfda45de4c2eb65b30e11e107779d3ecb
This commit is contained in:
zhimin.zeng 2025-05-22 09:45:44 +08:00 committed by lane.wei
parent 4efb2b0d9e
commit 4a15a6da6c

View File

@ -1326,8 +1326,11 @@ void Sidebar::priv::update_sync_status(const MachineObject *obj)
}
};
auto is_same_nozzle_info = [](const ExtruderInfo &left, const ExtruderInfo &right) {
return abs(left.diameter - right.diameter) < EPSILON && left.nozzle_volue_type == right.nozzle_volue_type;
auto is_same_nozzle_info = [obj](const ExtruderInfo &left, const ExtruderInfo &right) {
bool is_same_nozzle_type = true;
if (obj->is_nozzle_flow_type_supported())
is_same_nozzle_type = left.nozzle_volue_type == right.nozzle_volue_type;
return abs(left.diameter - right.diameter) < EPSILON && is_same_nozzle_type;
};
// 2. update extruder status