ENH:update SyncAmsInfoDialog

jira: none
Change-Id: I7549dd3334fd9bcc4eba5d3b41786516fd879f38
(cherry picked from commit 9b1717fa56b1d5baacc3801f23d1586050970574)
This commit is contained in:
zhou.xu
2025-01-16 09:21:37 +08:00
committed by Noisyfox
parent 55b5d6f3af
commit e5c2500667
8 changed files with 30 additions and 22 deletions

View File

@@ -124,14 +124,15 @@ void ComboBox::SetLabel(const wxString &value)
else {
if (is_replace_text_to_image) {
auto new_value = value;
new_value.Replace(replace_text, "", false);//replace first text
TextInput::SetIcon_1(image_for_text);
TextInput::SetLabel(new_value);
}
else {
TextInput::SetIcon_1("");
TextInput::SetLabel(value);
if (new_value.starts_with(replace_text)) {
new_value.Replace(replace_text, "", false); // replace first text
TextInput::SetIcon_1(image_for_text);
TextInput::SetLabel(new_value);
return;
}
}
TextInput::SetIcon_1("");
TextInput::SetLabel(value);
}
}