mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-24 08:10:50 +01:00
[poincare] Use the new hasAncestor parameter.
Change-Id: I1dcb612e01f7ba9ffbeaea7b53ab5e678667f02b
This commit is contained in:
@@ -94,7 +94,7 @@ void ConjugateLayout::replaceChildAndMoveCursor(const ExpressionLayout * oldChil
|
||||
|
||||
void ConjugateLayout::removePointedChildAtIndexAndMoveCursor(int index, bool deleteAfterRemoval, ExpressionLayoutCursor * cursor) {
|
||||
assert(index >= 0 && index < numberOfChildren());
|
||||
assert((cursor->pointedExpressionLayout() == child(index)) || (cursor->pointedExpressionLayout()->hasAncestor(child(index))));
|
||||
assert(cursor->pointedExpressionLayout()->hasAncestor(child(index), true));
|
||||
replaceChildAndMoveCursor(child(index), new EmptyLayout(), deleteAfterRemoval, cursor);
|
||||
}
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ void DynamicLayoutHierarchy::removeChildAtIndex(int index, bool deleteAfterRemov
|
||||
|
||||
void DynamicLayoutHierarchy::removePointedChildAtIndexAndMoveCursor(int index, bool deleteAfterRemoval, ExpressionLayoutCursor * cursor) {
|
||||
assert(index >= 0 && index < numberOfChildren());
|
||||
assert((cursor->pointedExpressionLayout() == child(index)) || (cursor->pointedExpressionLayout()->hasAncestor(child(index))));
|
||||
assert(cursor->pointedExpressionLayout()->hasAncestor(child(index), true));
|
||||
if (numberOfChildren() == 1) {
|
||||
if (m_parent) {
|
||||
if (!deleteAfterRemoval) {
|
||||
|
||||
@@ -184,7 +184,7 @@ void ExpressionLayout::removeChildAtIndex(int index, bool deleteAfterRemoval) {
|
||||
|
||||
void ExpressionLayout::removePointedChildAtIndexAndMoveCursor(int index, bool deleteAfterRemoval, ExpressionLayoutCursor * cursor) {
|
||||
assert(index >= 0 && index < numberOfChildren());
|
||||
assert((cursor->pointedExpressionLayout() == child(index)) || (cursor->pointedExpressionLayout()->hasAncestor(child(index))));
|
||||
assert(cursor->pointedExpressionLayout()->hasAncestor(child(index), true));
|
||||
removeChildAtIndex(index, deleteAfterRemoval);
|
||||
if (index < numberOfChildren()) {
|
||||
cursor->setPointedExpressionLayout(editableChild(index));
|
||||
|
||||
@@ -163,7 +163,7 @@ void MatrixLayout::replaceChildAndMoveCursor(const ExpressionLayout * oldChild,
|
||||
|
||||
void MatrixLayout::removePointedChildAtIndexAndMoveCursor(int index, bool deleteAfterRemoval, ExpressionLayoutCursor * cursor) {
|
||||
assert(index >= 0 && index < numberOfChildren());
|
||||
assert((cursor->pointedExpressionLayout() == child(index)) || (cursor->pointedExpressionLayout()->hasAncestor(child(index))));
|
||||
assert(cursor->pointedExpressionLayout()->hasAncestor(child(index), true));
|
||||
replaceChildAndMoveCursor(child(index), new EmptyLayout(), deleteAfterRemoval, cursor);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user