[apps/graph] FunctionTitleCell reload

Changed TextFieldFunctionTitleCell::reloadCell to solve an issue with
the alignment of a function's name and definition when changing the
expression :
  - typing u_n = (1/3)/2 then changing to u_n = 1/(2/3) without erasing
    the formula first. u_n would no longer be aligned with the = sign.

Change-Id: Ib58e4220dc67c77639272c7ea784418bddffb432
This commit is contained in:
Gabriel Ozouf
2020-06-17 17:44:45 +02:00
committed by Émilie Feral
parent 43fc937469
commit 9f4aafd6b6
2 changed files with 6 additions and 0 deletions

View File

@@ -62,6 +62,11 @@ void TextFieldFunctionTitleCell::layoutSubviews(bool force) {
m_textField.setAlignment(horizontalAlignment, verticalAlignment());
}
void TextFieldFunctionTitleCell::reloadCell() {
layoutSubviews();
FunctionTitleCell::reloadCell();
}
void TextFieldFunctionTitleCell::didBecomeFirstResponder() {
if (isEditing()) {
Container::activeApp()->setFirstResponder(&m_textField);

View File

@@ -35,6 +35,7 @@ public:
return &m_textField;
}
void layoutSubviews(bool force = false) override;
void reloadCell() override;
// Responder
void didBecomeFirstResponder() override;