From 356169c749d6c9b4522c0044177d5e2dae88310e Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Thu, 20 Oct 2022 17:39:36 +0200 Subject: [PATCH] Fixing expression being set even if errors are found. --- .../eu/ad5001/LogarithmPlotter/Setting/ExpressionEditor.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/ExpressionEditor.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/ExpressionEditor.qml index 87c3885..9ca2878 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/ExpressionEditor.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/ExpressionEditor.qml @@ -475,12 +475,13 @@ Item { } if(expr.requiredObjects().includes(control.self)) throw new Error(qsTranslate('error', 'Object cannot be dependent on itself.')) - // TODO: Check for recursive dependencies. + // TODO: Check for recursive dependencies. + return expr } catch(e) { // Error in expression parsingErrorDialog.showDialog(propertyName, newExpression, e.message) + return null } - return expr } /*!