FIX: the pa profile name cannot be repeated when edit k value

jira: STUDIO-10992
Change-Id: I50d61e9581e188a10a4f804df163b3d50eb7caa0
(cherry picked from commit 431925adf0749faafeaf46ac0b8d60c6d4e5972a)
This commit is contained in:
zhimin.zeng
2025-03-19 21:40:56 +08:00
committed by Noisyfox
parent b9ad057d1a
commit 08aef5bf53
4 changed files with 37 additions and 7 deletions

View File

@@ -603,12 +603,13 @@ void CalibrationPresetPage::create_selection_panel(wxWindow* parent)
on_device_connected(curr_obj);
});
auto sync_button_text = new Label(parent, _L("Sync printer information"));
sync_button_text->SetFont(Label::Head_14);
sync_button_text->Wrap(-1);
wxString sync_text = _L("Sync printer information") + _L(" Synced");
m_sync_button_text = new Label(parent, sync_text);
m_sync_button_text->SetFont(Label::Head_14);
m_sync_button_text->Wrap(-1);
sync_button_sizer->Add(m_btn_sync);
sync_button_sizer->AddSpacer(FromDIP(20));
sync_button_sizer->Add(sync_button_text, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
sync_button_sizer->Add(m_sync_button_text, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0);
panel_sizer->Add(sync_button_sizer);
panel_sizer->AddSpacer(PRESET_GAP);
@@ -1645,9 +1646,13 @@ void CalibrationPresetPage::update_sync_button_status()
if (synced) {
m_btn_sync->SetBorderColor(synced_colour);
m_btn_sync->SetIcon("ams_nozzle_sync");
wxString sync_text = _L("Sync printer information") + _L(" (Synced)");
m_sync_button_text->SetLabel(sync_text);
} else {
m_btn_sync->SetBorderColor(not_synced_colour);
m_btn_sync->SetIcon("printer_sync");
wxString sync_text = _L("Sync printer information") + _L(" (Not synced)");
m_sync_button_text->SetLabel(sync_text);
}
};