[expression_editor] Collapse brothers when adding a fraction.

Change-Id: I4d75fae152fca4a6671abd1e444f6aaa27c168b5
This commit is contained in:
Léa Saviot
2018-01-03 17:23:35 +01:00
parent 25c036a078
commit 8a7e4e598c
5 changed files with 56 additions and 18 deletions

View File

@@ -106,7 +106,7 @@ bool Controller::handleMoveEvent(Ion::Events::Event event) {
ExpressionLayout * Controller::handleAddEvent(Ion::Events::Event event) {
if (event == Ion::Events::Division) {
return m_cursor.addEmptyFractionLayout();
return m_cursor.addFractionLayoutAndCollapseBrothers();
}
if (event == Ion::Events::XNT) {
return m_cursor.addXNTCharLayout();