mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-28 18:20:14 +01:00
[poincare] Fixed deletion bug in MatrixLayout.
Change-Id: I0dbc142468320fac4ed8969a3ef2684549315780
This commit is contained in:
@@ -117,6 +117,12 @@ void MatrixLayout::replaceChildAndMoveCursor(const ExpressionLayout * oldChild,
|
||||
cursor->setPosition(ExpressionLayoutCursor::Position::Left);
|
||||
}
|
||||
|
||||
void MatrixLayout::removePointedChildAtIndexAndMoveCursor(int index, bool deleteAfterRemoval, ExpressionLayoutCursor * cursor) {
|
||||
assert(index >= 0 && index < numberOfChildren());
|
||||
assert(cursor->pointedExpressionLayout() == child(index));
|
||||
replaceChildAndMoveCursor(child(index), new EmptyVisibleLayout(), deleteAfterRemoval, cursor);
|
||||
}
|
||||
|
||||
int MatrixLayout::writeTextInBuffer(char * buffer, int bufferSize) const {
|
||||
// The grid is a matrix.
|
||||
if (bufferSize == 0) {
|
||||
|
||||
@@ -19,6 +19,7 @@ public:
|
||||
/* Dynamic layout */
|
||||
void replaceChild(const ExpressionLayout * oldChild, ExpressionLayout * newChild, bool deleteOldChild = true) override;
|
||||
void replaceChildAndMoveCursor(const ExpressionLayout * oldChild, ExpressionLayout * newChild, bool deleteOldChild, ExpressionLayoutCursor * cursor) override;
|
||||
void removePointedChildAtIndexAndMoveCursor(int index, bool deleteAfterRemoval, ExpressionLayoutCursor * cursor) override;
|
||||
|
||||
/* Expression engine */
|
||||
int writeTextInBuffer(char * buffer, int bufferSize) const override;
|
||||
|
||||
Reference in New Issue
Block a user