mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Curve Calculator : Do not report detected variables as lowercase
This commit is contained in:
@@ -127,10 +127,6 @@ caf::PdmFieldHandle* RimCalculation::userDescriptionField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimCalculation::parseExpression()
|
||||
{
|
||||
// The expression parser handles only variables in lower case
|
||||
QString lowerVariant = m_expression().toLower();
|
||||
m_expression = lowerVariant;
|
||||
|
||||
QString leftHandSideVariableName = RimCalculation::findLeftHandSide(m_expression);
|
||||
if (leftHandSideVariableName.isEmpty()) return false;
|
||||
|
||||
|
@@ -38,7 +38,16 @@ std::vector<QString> ExpressionParserImpl::detectReferencedVariables(const QStri
|
||||
|
||||
for (const auto& s : variable_list)
|
||||
{
|
||||
referencedVariables.push_back(QString::fromStdString(s));
|
||||
QString variableNameLowerCase = QString::fromStdString(s);
|
||||
|
||||
// ExprTk reports always in
|
||||
|
||||
int index = expression.indexOf(variableNameLowerCase, 0, Qt::CaseInsensitive);
|
||||
if (index > -1)
|
||||
{
|
||||
|
||||
referencedVariables.push_back(expression.mid(index, variableNameLowerCase.size()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user