[poincare/layout_cursor] Fix cursor after Square

When typing Square in 2D Edition mode, the cursor would not be
repositionned correctly, leading to some issues :
  - Typing 2 POW 3, pressing RIGHT to return to the baseline, then
    typing POW again adds parentheses around 2^3, as is mathematically
    correct. Typing 2 SQUARE, then POW, would show 2^2^_, while
    the user really typed (2^2)^_.

Change-Id: I29c01d964924907a1866490189ea56e40771521d
This commit is contained in:
Gabriel Ozouf
2020-08-18 17:48:01 +02:00
committed by Émilie Feral
parent 504223612d
commit be8e452285

View File

@@ -177,6 +177,8 @@ void LayoutCursor::addEmptyPowerLayout() {
void LayoutCursor::addEmptySquarePowerLayout() {
VerticalOffsetLayout offsetLayout = VerticalOffsetLayout::Builder(CodePointLayout::Builder('2'), VerticalOffsetLayoutNode::Position::Superscript);
privateAddEmptyPowerLayout(offsetLayout);
m_layout = offsetLayout;
m_position = Position::Right;
}
void LayoutCursor::addEmptyTenPowerLayout() {