FIX:Platename allow input of spaces,and its total length can reach 40
Change-Id: I97f9ddd5be472faa0ba1f1dfaa5863353b967225 (cherry picked from commit 1c7acc70660a165dd6d9d732ee574fbb9c4e9fde)
This commit is contained in:
parent
0a5aa3ebb2
commit
aca2e18549
|
@ -1609,7 +1609,7 @@ void PartPlate::set_plate_name(const std::string &name)
|
|||
// compare if name equal to m_name, case sensitive
|
||||
if (boost::equals(m_name, name)) return;
|
||||
m_name = name;
|
||||
m_name.erase(remove_if(m_name.begin(), m_name.end(), ::isspace), m_name.end());
|
||||
|
||||
std::regex reg("[\\\\/:*?\"<>|]");
|
||||
m_name= regex_replace(m_name, reg, "");
|
||||
m_name_change = true;
|
||||
|
|
|
@ -48,7 +48,7 @@ PlateSettingsDialog::PlateSettingsDialog(wxWindow* parent, wxWindowID id, const
|
|||
m_ti_plate_name = new TextInput(this, wxString::FromDouble(0.0), "", "", wxDefaultPosition, wxSize(FromDIP(240), -1), wxTE_PROCESS_ENTER);
|
||||
top_sizer->Add(plate_name_txt, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxALL, FromDIP(5));
|
||||
top_sizer->Add(m_ti_plate_name, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, FromDIP(5));
|
||||
m_ti_plate_name->GetTextCtrl()->SetMaxLength(14);
|
||||
m_ti_plate_name->GetTextCtrl()->SetMaxLength(40);
|
||||
|
||||
m_sizer_main->Add(top_sizer, 0, wxEXPAND | wxALL, FromDIP(30));
|
||||
|
||||
|
|
Loading…
Reference in New Issue