fix(cpn): radio specific name and label validators (#4670)
Only allows valid characters in names, drops invalid characters if present
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "helpers.h"
|
||||
#include "filtereditemmodels.h"
|
||||
#include "eeprominterface.h"
|
||||
#include "namevalidator.h"
|
||||
|
||||
float curveLinear(float x, float coeff, float yMin, float yMid, float yMax)
|
||||
{
|
||||
@@ -133,6 +134,7 @@ CurveDialog::CurveDialog(QWidget * parent, ModelData & model, const int curveIdx
|
||||
maxCurves = firmware->getCapability(NumCurves);
|
||||
maxPoints = firmware->getCapability(NumCurvePoints);
|
||||
|
||||
ui->curveName->setValidator(new NameValidator(firmware->getBoard(), this));
|
||||
ui->curveName->setField(curve.name, CURVEDATA_NAME_LEN);
|
||||
connect(ui->curveName, &AutoLineEdit::currentDataChanged, this, &CurveDialog::on_curveNameChanged);
|
||||
on_curveNameChanged();
|
||||
|
||||
Reference in New Issue
Block a user