FIX: The original data of combox is not cleared during initialization

jira: STUDIO-11005
Change-Id: Id5b7259b517a515c2f641ce32998f09e182902ff
This commit is contained in:
zhimin.zeng 2025-03-20 12:11:17 +08:00 committed by lane.wei
parent 358c289d4c
commit ad1f6bdca4
1 changed files with 5 additions and 0 deletions

View File

@ -796,6 +796,7 @@ float nozzle_diameter_list[NOZZLE_LIST_COUNT] = {0.2, 0.4, 0.6, 0.8 };
void CalibrationPresetPage::init_selection_values()
{
// init nozzle diameter
m_comboBox_nozzle_dia->Clear();
for (int i = 0; i < NOZZLE_LIST_COUNT; i++) {
m_comboBox_nozzle_dia->AppendString(wxString::Format("%1.1f mm", nozzle_diameter_list[i]));
}
@ -837,11 +838,13 @@ void CalibrationPresetPage::init_selection_values()
// left
{
m_left_comboBox_nozzle_dia->Clear();
for (int i = 0; i < NOZZLE_LIST_COUNT; i++) {
m_left_comboBox_nozzle_dia->AppendString(wxString::Format("%1.1f mm", nozzle_diameter_list[i]));
}
m_left_comboBox_nozzle_dia->SetSelection(NOZZLE_LIST_DEFAULT);
m_left_comboBox_nozzle_volume->Clear();
const ConfigOptionDef *nozzle_volume_type_def = print_config_def.get("nozzle_volume_type");
if (nozzle_volume_type_def && nozzle_volume_type_def->enum_keys_map) {
for (auto item : nozzle_volume_type_def->enum_labels) {
@ -854,11 +857,13 @@ void CalibrationPresetPage::init_selection_values()
// right
{
m_right_comboBox_nozzle_dia->Clear();
for (int i = 0; i < NOZZLE_LIST_COUNT; i++) {
m_right_comboBox_nozzle_dia->AppendString(wxString::Format("%1.1f mm", nozzle_diameter_list[i]));
}
m_right_comboBox_nozzle_dia->SetSelection(NOZZLE_LIST_DEFAULT);
m_right_comboBox_nozzle_volume->Clear();
const ConfigOptionDef *nozzle_volume_type_def = print_config_def.get("nozzle_volume_type");
if (nozzle_volume_type_def && nozzle_volume_type_def->enum_keys_map) {
for (auto item : nozzle_volume_type_def->enum_labels) {