From f75fdbda12971285402da575dd9b6beecca9298d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Wed, 9 May 2018 16:37:54 +0200 Subject: [PATCH] [poincare] Fix Exp SquarePower SquarePower Change-Id: I2c378728fe99096497d396dd6ae526867326ace5 --- poincare/src/layout/vertical_offset_layout.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/poincare/src/layout/vertical_offset_layout.cpp b/poincare/src/layout/vertical_offset_layout.cpp index 2c0ff224e..48cd88df1 100644 --- a/poincare/src/layout/vertical_offset_layout.cpp +++ b/poincare/src/layout/vertical_offset_layout.cpp @@ -254,7 +254,6 @@ void VerticalOffsetLayout::privateAddSibling(ExpressionLayoutCursor * cursor, Ex VerticalOffsetLayout * verticalOffsetSibling = static_cast(sibling); if (verticalOffsetSibling->type() == Type::Superscript) { assert(m_parent->isHorizontal()); - // Add the Left parenthesis int indexInParent = m_parent->indexOfChild(this); int leftParenthesisIndex = indexInParent; @@ -266,7 +265,7 @@ void VerticalOffsetLayout::privateAddSibling(ExpressionLayoutCursor * cursor, Ex leftParenthesisIndex--; } m_parent->addChildAtIndex(leftParenthesis, leftParenthesisIndex); - indexInParent++; + indexInParent = m_parent->indexOfChild(this); // Add the Right parenthesis RightParenthesisLayout * rightParenthesis = new RightParenthesisLayout();