diff --git a/poincare/src/layout/horizontal_layout.cpp b/poincare/src/layout/horizontal_layout.cpp index 815161b80..e9285e151 100644 --- a/poincare/src/layout/horizontal_layout.cpp +++ b/poincare/src/layout/horizontal_layout.cpp @@ -367,11 +367,11 @@ void HorizontalLayout::privateAddBrother(ExpressionLayoutCursor * cursor, Expres cursor->setPosition(ExpressionLayoutCursor::Position::Right); } } - addChildAtIndex(brother, 0); + addOrMergeChildAtIndex(brother, 0, false); return; } assert(cursor->position() == ExpressionLayoutCursor::Position::Right); - addChildAtIndex(brother, numberOfChildren()); + addOrMergeChildAtIndex(brother, numberOfChildren(), false); if (moveCursor) { cursor->setPointedExpressionLayout(this); }