mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-28 01:59:59 +01:00
[poincare] Fix empty layout that stayed
When typing 1|23 then pressing / and poing up. Change-Id: I15752919914af526b35483b2abf2a027cddc4e7b
This commit is contained in:
@@ -85,7 +85,7 @@ void ExpressionLayoutCursor::addFractionLayoutAndCollapseBrothers() {
|
||||
rightBrother = newChild->editableParent()->editableChild(fractionIndexInParent+1);
|
||||
if (rightBrother->isCollapsable(&numberOfOpenParenthesis, false)) {
|
||||
newChild->editableParent()->removeChildAtIndex(fractionIndexInParent+1, false);
|
||||
child2->addOrMergeChildAtIndex(rightBrother, child2->numberOfChildren(), false);
|
||||
child2->addOrMergeChildAtIndex(rightBrother, child2->numberOfChildren(), true);
|
||||
numberOfBrothers--;
|
||||
} else {
|
||||
break;
|
||||
|
||||
@@ -278,12 +278,12 @@ bool HorizontalLayout::moveDown(ExpressionLayoutCursor * cursor, bool * shouldRe
|
||||
}
|
||||
|
||||
void HorizontalLayout::addChildrenAtIndex(const ExpressionLayout * const * operands, int numberOfOperands, int indexForInsertion, bool removeEmptyChildren) {
|
||||
int newIndex = removeEmptyChildBeforeInsertionAtIndex(indexForInsertion, operands[0]->mustHaveLeftBrother());
|
||||
int newIndex = removeEmptyChildBeforeInsertionAtIndex(indexForInsertion, !operands[0]->mustHaveLeftBrother());
|
||||
DynamicLayoutHierarchy::addChildrenAtIndex(operands, numberOfOperands, newIndex, removeEmptyChildren);
|
||||
}
|
||||
|
||||
bool HorizontalLayout::addChildAtIndex(ExpressionLayout * operand, int index) {
|
||||
int newIndex = removeEmptyChildBeforeInsertionAtIndex(index, operand->mustHaveLeftBrother());
|
||||
int newIndex = removeEmptyChildBeforeInsertionAtIndex(index, !operand->mustHaveLeftBrother());
|
||||
return DynamicLayoutHierarchy::addChildAtIndex(operand, newIndex);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user