From 08b3f73b9c904932a8e41f62341b679a22daaf6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Thu, 17 May 2018 10:05:04 +0200 Subject: [PATCH] [escher] Return true when layout too big to be handled Change-Id: If15f032c4d1666021435927d90f500afbdee3bfd --- escher/src/expression_layout_field.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/escher/src/expression_layout_field.cpp b/escher/src/expression_layout_field.cpp index 255ee5653..395b3404f 100644 --- a/escher/src/expression_layout_field.cpp +++ b/escher/src/expression_layout_field.cpp @@ -221,13 +221,13 @@ bool ExpressionLayoutField::handleEventWithText(const char * text, bool indentat } Poincare::Expression * resultExpression = Poincare::Expression::parse(text); if (resultExpression == nullptr) { - return false; + return true; } Poincare::ExpressionLayout * resultLayout = resultExpression->createLayout(); delete resultExpression; if (currentNumberOfLayouts + resultLayout->numberOfDescendants(true) >= k_maxNumberOfLayouts) { delete resultLayout; - return false; + return true; } // Find the pointed layout. Poincare::ExpressionLayout * pointedLayout = nullptr;