[escher] expressionLayoutFieldDidChangeSize reloads only the modalView

Change-Id: Ib406c7d10e2befae9d660e025c84df58a2e9b70c
This commit is contained in:
Léa Saviot
2018-04-25 15:15:12 +02:00
parent 832f7c3c74
commit 8778516fe2
3 changed files with 8 additions and 3 deletions

View File

@@ -87,12 +87,12 @@ bool InputViewController::expressionLayoutFieldDidAbortEditing(ExpressionLayoutF
}
void InputViewController::expressionLayoutFieldDidChangeSize(ExpressionLayoutField * expressionLayoutField) {
// Reload the view only if the ExpressionField height actually changes,
// i.e. not if the height is already maximal and stays maximal.
/* Reload the view only if the ExpressionField height actually changes, i.e.
* not if the height is already maximal and stays maximal. */
bool newInputViewHeightIsMaximal = m_expressionFieldController.expressionField()->heightIsMaximal();
if (!m_inputViewHeightIsMaximal || !newInputViewHeightIsMaximal) {
m_inputViewHeightIsMaximal = newInputViewHeightIsMaximal;
reloadView();
reloadModalViewController();
}
}