FIX: the name is too long

jira: [STUDIO-10376]
Change-Id: I93bcf0936122874dd5b4a2d57df690e78d09d517
This commit is contained in:
xin.zhang 2025-02-18 12:17:01 +08:00 committed by lane.wei
parent ab018130d7
commit 1865dcd1b9
1 changed files with 7 additions and 0 deletions

View File

@ -946,8 +946,15 @@ void EditDevNameDialog::on_edit_name(wxCommandEvent &e)
m_valid_type = NoValid;
}
if (m_valid_type == Valid && new_dev_name.length() > 32)
{
info_line = _L("The name is not allowed to exceeds 32 characters.");
m_valid_type = NoValid;
}
if (m_valid_type == NoValid) {
m_static_valid->SetLabel(info_line);
m_static_valid->Wrap(m_static_valid->GetSize().GetWidth());
Layout();
}