diff --git a/src/slic3r/GUI/PartPlate.cpp b/src/slic3r/GUI/PartPlate.cpp index abe615d13..33faaa48b 100644 --- a/src/slic3r/GUI/PartPlate.cpp +++ b/src/slic3r/GUI/PartPlate.cpp @@ -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; diff --git a/src/slic3r/GUI/PlateSettingsDialog.cpp b/src/slic3r/GUI/PlateSettingsDialog.cpp index d6cbfdb96..6b3ef0c83 100644 --- a/src/slic3r/GUI/PlateSettingsDialog.cpp +++ b/src/slic3r/GUI/PlateSettingsDialog.cpp @@ -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));