From 09664666864174a7e10c4b76ecb3954be83d96a8 Mon Sep 17 00:00:00 2001 From: Bryan Paradis Date: Sun, 23 Feb 2025 10:01:00 -0800 Subject: [PATCH] validate math formula on text change --- .../PC_Application/LibreVNA-GUI/Traces/traceeditdialog.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Software/PC_Application/LibreVNA-GUI/Traces/traceeditdialog.cpp b/Software/PC_Application/LibreVNA-GUI/Traces/traceeditdialog.cpp index 852705a..fab0edb 100644 --- a/Software/PC_Application/LibreVNA-GUI/Traces/traceeditdialog.cpp +++ b/Software/PC_Application/LibreVNA-GUI/Traces/traceeditdialog.cpp @@ -147,8 +147,7 @@ TraceEditDialog::TraceEditDialog(Trace &t, QWidget *parent) : // Math source configuration if(t.getModel()) { - ui->lMathFormula->setText(t.getMathFormula()); - connect(ui->lMathFormula, &QLineEdit::editingFinished, [&](){ + connect(ui->lMathFormula, &QLineEdit::textChanged, [&](){ t.setMathFormula(ui->lMathFormula->text()); ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(t.mathFormularValid()); });