From 5abb05e7bc9f4725b0cc3f4b4ed6fedfb8d6d5ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Mon, 21 Jan 2019 17:54:11 +0100 Subject: [PATCH] [poincare] Store: implementation of deepReduceChildren should recursively test that the children are not matrix (or enable the interruption flag) --- poincare/src/store.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/poincare/src/store.cpp b/poincare/src/store.cpp index a38327460..52b17fac4 100644 --- a/poincare/src/store.cpp +++ b/poincare/src/store.cpp @@ -16,6 +16,10 @@ extern "C" { namespace Poincare { void StoreNode::deepReduceChildren(Context & context, Preferences::ComplexFormat complexFormat, Preferences::AngleUnit angleUnit, ExpressionNode::ReductionTarget target) { + // Interrupt simplification if the expression stored contains a matrix + if (Expression(childAtIndex(0)).recursivelyMatches([](const Expression e, Context & context, bool replaceSymbols) { return Expression::IsMatrix(e, context, replaceSymbols); }, context, true)) { + Expression::SetInterruption(true); + } return; }