mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-22 07:10:40 +01:00
[apps/escher] Force expressionField relayout when size changed
Scenario: in Calculations and in Graph, edit the layout field by adding many parentheses. When the layout field has maximal height but the parentheses are bigger than it, ther is a margin that appears at the bottom, because we did not relayout the layout field to optimize redrawing. We need to force the relayout, otherwise as the layout field stays we the same frame, the relayouting is not properly done.
This commit is contained in:
@@ -98,6 +98,13 @@ void EditExpressionController::layoutFieldDidChangeSize(::LayoutField * layoutFi
|
||||
if (!m_inputViewHeightIsMaximal || !newInputViewHeightIsMaximal) {
|
||||
m_inputViewHeightIsMaximal = newInputViewHeightIsMaximal;
|
||||
reloadView();
|
||||
} else {
|
||||
/* The input view is already at maximal size so we do not need to relayout
|
||||
* the view underneath, but the view inside the input view might still need
|
||||
* to be relayouted.
|
||||
* We force the relayout because the frame stays the same but we need to
|
||||
* propagate a relayout to the content of the field scroll view. */
|
||||
m_contentView.expressionField()->layoutSubviews(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user