| 1434 | } |
| 1435 | |
| 1436 | void MacroActionVariableEdit::MathExpressionChanged() |
| 1437 | { |
| 1438 | GUARD_LOADING_AND_LOCK(); |
| 1439 | _entryData->_mathExpression = _mathExpression->text().toStdString(); |
| 1440 | |
| 1441 | // In case of invalid expression display an error |
| 1442 | auto result = EvalMathExpression(_entryData->_mathExpression); |
| 1443 | auto hasError = std::holds_alternative<std::string>(result); |
| 1444 | if (hasError) { |
| 1445 | _mathExpressionResult->setText( |
| 1446 | QString::fromStdString(std::get<std::string>(result))); |
| 1447 | } |
| 1448 | _mathExpressionResult->setVisible(hasError); |
| 1449 | |
| 1450 | adjustSize(); |
| 1451 | updateGeometry(); |
| 1452 | } |
| 1453 | |
| 1454 | void MacroActionVariableEdit::UseCustomPromptChanged(int value) |
| 1455 | { |
nothing calls this directly
no test coverage detected