From 5270c7740b9d222f0024783eed747fa7ca4e643b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Tue, 12 Jun 2018 16:54:25 +0200 Subject: [PATCH] [escher] Fix cursor position when copy pasting --- escher/src/expression_layout_field.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/escher/src/expression_layout_field.cpp b/escher/src/expression_layout_field.cpp index 1df128016..f32337381 100644 --- a/escher/src/expression_layout_field.cpp +++ b/escher/src/expression_layout_field.cpp @@ -286,6 +286,9 @@ void ExpressionLayoutField::insertLayoutAtCursor(Poincare::ExpressionLayout * la m_contentView.cursor()->setPointedExpressionLayout(layout->layoutToPointWhenInserting()); m_contentView.cursor()->setPosition(Poincare::ExpressionLayoutCursor::Position::Right); } + } else if (!layoutWillBeMerged) { + m_contentView.cursor()->setPointedExpressionLayout(layout); + m_contentView.cursor()->setPosition(Poincare::ExpressionLayoutCursor::Position::Right); } m_contentView.cursor()->pointedExpressionLayout()->addGreySquaresToAllMatrixAncestors(); m_contentView.cursor()->hideEmptyLayoutIfNeeded();