FIX: the name is too long

jira: [STUDIO-10376]
Change-Id: I93bcf0936122874dd5b4a2d57df690e78d09d517
(cherry picked from commit 1865dcd1b954e1a15109e7bb6e1eff14ef0fa2e1)
This commit is contained in:
xin.zhang
2025-02-18 12:17:01 +08:00
committed by Noisyfox
parent 18ffc5497b
commit c9d5a3b482

View File

@@ -951,8 +951,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();
}