MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / MathExpressionChanged

Method MathExpressionChanged

lib/macro/macro-action-variable.cpp:1436–1452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1434}
1435
1436void 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
1454void MacroActionVariableEdit::UseCustomPromptChanged(int value)
1455{

Callers

nothing calls this directly

Calls 2

EvalMathExpressionFunction · 0.85
setTextMethod · 0.80

Tested by

no test coverage detected