Improved error handing for function analysis for functions in the f(y) format (#1338)
* Updated the CanFunctionAnalysisBePerformed api to use the updated one with variableIsNotX error handling. Updated the UI to reflect the new descriptive error case to show an informative error. * Fixed spacing and updated the moved the variableIsNotX check up into the parent if statement * Update the internals version to match the version needed to support this change
This commit is contained in:
@@ -254,8 +254,8 @@ namespace GraphControl
|
||||
vector<Equation ^> equationVector;
|
||||
equationVector.push_back(equation);
|
||||
UpdateGraphOptions(graph->GetOptions(), equationVector);
|
||||
|
||||
if (analyzer->CanFunctionAnalysisBePerformed())
|
||||
bool variableIsNotX;
|
||||
if (analyzer->CanFunctionAnalysisBePerformed(variableIsNotX) && !variableIsNotX)
|
||||
{
|
||||
if (S_OK
|
||||
== analyzer->PerformFunctionAnalysis(
|
||||
@@ -265,6 +265,10 @@ namespace GraphControl
|
||||
return KeyGraphFeaturesInfo::Create(functionAnalysisData);
|
||||
}
|
||||
}
|
||||
else if (variableIsNotX)
|
||||
{
|
||||
return KeyGraphFeaturesInfo::Create(CalculatorApp::AnalysisErrorType::VariableIsNotX);
|
||||
}
|
||||
else
|
||||
{
|
||||
return KeyGraphFeaturesInfo::Create(CalculatorApp::AnalysisErrorType::AnalysisNotSupported);
|
||||
|
Reference in New Issue
Block a user