mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-28 18:20:14 +01:00
[poincare] BracketPairLayoutNode and BracketLayoutNode
This commit is contained in:
@@ -5,6 +5,8 @@ SFLAGS += -Ipoincare/include
|
||||
objs += $(addprefix poincare/src/,\
|
||||
absolute_value_layout_node.o\
|
||||
binomial_coefficient_layout_node.o\
|
||||
bracket_layout_node.o\
|
||||
bracket_pair_layout_node.o\
|
||||
addition.o\
|
||||
arithmetic.o\
|
||||
expression_lexer.o\
|
||||
|
||||
@@ -76,14 +76,14 @@ void BracketPairLayoutNode::deleteBeforeCursor(LayoutCursor * cursor) {
|
||||
LayoutRef rootRef = LayoutRef(root());
|
||||
LayoutRef thisRef = LayoutRef(this);
|
||||
LayoutRef child = childLayout();
|
||||
replaceChildWithGhostInPlace(child);
|
||||
thisRef.replaceChildWithGhostInPlace(child);
|
||||
// WARNING: do not call "this" afterwards
|
||||
if (rootRef.isAllocationFailure()) {
|
||||
cursor->setLayoutReference(rootRef);
|
||||
return;
|
||||
}
|
||||
cursor->setLayoutReference(thisRef.childAtIndex(0));
|
||||
cursor->setPosition(LayoutNode::Position::Left);
|
||||
cursor->setPosition(LayoutCursor::Position::Left);
|
||||
thisRef.replaceWith(child, cursor);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user