FIX: enhance for cali

1. Optimize the message for repeat names
2. Modify the recommended name
jira:none

Change-Id: Iebc5807208dcbe2086f690fda453a2f2abb032f7
(cherry picked from commit 4fe716a9c9268838929bdb8e08372fcd521d4fa2)
This commit is contained in:
zhimin.zeng
2024-11-16 14:35:25 +08:00
committed by Noisyfox
parent 37ff918ea9
commit dfe137200c
3 changed files with 116 additions and 19 deletions

View File

@@ -868,7 +868,11 @@ void NewCalibrationHistoryDialog::on_ok(wxCommandEvent &event)
// Check for duplicate names from history
{
auto iter = std::find_if(m_history_results.begin(), m_history_results.end(), [this](const PACalibResult &item) {
return item.name == m_new_result.name && item.filament_id == m_new_result.filament_id;
bool has_same_name = item.name == m_new_result.name && item.filament_id == m_new_result.filament_id;
if (curr_obj && curr_obj->is_multi_extruders()) {
has_same_name &= (item.extruder_id == m_new_result.extruder_id && item.nozzle_volume_type == m_new_result.nozzle_volume_type);
}
return has_same_name;
});
if (iter != m_history_results.end()) {