mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-24 08:10:50 +01:00
[escher] OnFinishEditing, clear the layout.
The layout should never be deleted + this fixes the ELField size that might stay big once emptied (e.g. 1 / 2 OK would leave an empty ELField, but with a big vertical size). Change-Id: I3971115d3bad48ce36a449e01bd12d5d8229ca4c
This commit is contained in:
@@ -126,10 +126,7 @@ bool ExpressionLayoutField::privateHandleEvent(Ion::Events::Event event) {
|
||||
char buffer[bufferSize];
|
||||
m_contentView.expressionView()->expressionLayout()->writeTextInBuffer(buffer, bufferSize);
|
||||
if (m_delegate->expressionLayoutFieldDidFinishEditing(this, buffer, event)) {
|
||||
delete m_contentView.expressionView()->expressionLayout();
|
||||
Poincare::ExpressionLayout * newLayout = new Poincare::HorizontalLayout();
|
||||
m_contentView.editableExpressionView()->setExpressionLayout(newLayout);
|
||||
m_contentView.cursor()->setPointedExpressionLayout(newLayout);
|
||||
clearLayout();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user