Don't allow "_" in user metric name

since it is alread used to replace blanks and breaks some functionality,
for example names with "_" don't appear on column chooser.
This commit is contained in:
Ale Martinez
2020-12-17 15:48:36 -03:00
parent 055833eed9
commit e098816f2b

View File

@@ -281,7 +281,8 @@ EditUserMetricDialog::setErrors(QStringList &list)
void
EditUserMetricDialog::enableOk()
{
okButton->setEnabled(!symbol->text().isEmpty() && !name->text().isEmpty());
// Check symbol and name are non-empty, and "_" is not used in name.
okButton->setEnabled(!symbol->text().isEmpty() && !name->text().isEmpty() && !name->text().contains("_"));
}
bool