Merge pull request #2142 from griebd/limit_special_characters_in_model_name_2122

Fix #2122 on next branch
This commit is contained in:
Bertrand Songis
2015-03-13 20:44:52 +01:00
+2
View File
@@ -377,6 +377,8 @@ SetupPanel::SetupPanel(QWidget *parent, ModelData & model, GeneralSettings & gen
ui->setupUi(this); ui->setupUi(this);
QRegExp rx(CHAR_FOR_NAMES_REGEX);
ui->name->setValidator(new QRegExpValidator(rx, this));
ui->name->setMaxLength(IS_TARANIS(board) ? 12 : 10); ui->name->setMaxLength(IS_TARANIS(board) ? 12 : 10);
if (firmware->getCapability(ModelImage)) { if (firmware->getCapability(ModelImage)) {