mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[poincare/unit] Remove some additional results
Imperial additional results now only appear when the selected unit system is Imperial. Change-Id: Icc314d0148810bea67e4d729179393f1fceaf214
This commit is contained in:
committed by
Émilie Feral
parent
801c61549c
commit
860ce558c2
@@ -257,10 +257,10 @@ Calculation::AdditionalInformationType Calculation::additionalInformationType(Co
|
||||
/* FIXME : When this method is accessed via leaving the additional outputs,
|
||||
* ie via a press on BACK, the reduction is interrupted, and removeUnit
|
||||
* goes badly.*/
|
||||
PoincareHelpers::Reduce(&o, App::app()->localContext(), ExpressionNode::ReductionTarget::User, ExpressionNode::SymbolicComputation::ReplaceAllSymbolsWithDefinitionsOrUndefined);
|
||||
PoincareHelpers::Reduce(&o, App::app()->localContext(), ExpressionNode::ReductionTarget::User, ExpressionNode::SymbolicComputation::ReplaceAllSymbolsWithDefinitionsOrUndefined, ExpressionNode::UnitConversion::None);
|
||||
o = o.removeUnit(&unit);
|
||||
double value = PoincareHelpers::ApproximateToScalar<double>(o, App::app()->localContext());
|
||||
return (Unit::ShouldDisplayAdditionalOutputs(value, unit)) ? AdditionalInformationType::Unit : AdditionalInformationType::None;
|
||||
return (Unit::ShouldDisplayAdditionalOutputs(value, unit, GlobalPreferences::sharedGlobalPreferences()->unitFormat())) ? AdditionalInformationType::Unit : AdditionalInformationType::None;
|
||||
}
|
||||
if (o.isBasedIntegerCappedBy(k_maximalIntegerWithAdditionalInformation)) {
|
||||
return AdditionalInformationType::Integer;
|
||||
|
||||
Reference in New Issue
Block a user