Remember cursor position and return focus to the formula field.
--HG-- branch : develop
This commit is contained in:
parent
67240af260
commit
61178e64de
|
@ -1129,7 +1129,10 @@ void TMainWindow::ShowMData()
|
||||||
void TMainWindow::DeployFormula()
|
void TMainWindow::DeployFormula()
|
||||||
{
|
{
|
||||||
SCASSERT(ui->plainTextEditFormula != nullptr);
|
SCASSERT(ui->plainTextEditFormula != nullptr);
|
||||||
SCASSERT(ui->pushButtonGrow != nullptr)
|
SCASSERT(ui->pushButtonGrow != nullptr);
|
||||||
|
|
||||||
|
const QTextCursor cursor = ui->plainTextEditFormula->textCursor();
|
||||||
|
|
||||||
if (ui->plainTextEditFormula->height() < DIALOG_MAX_FORMULA_HEIGHT)
|
if (ui->plainTextEditFormula->height() < DIALOG_MAX_FORMULA_HEIGHT)
|
||||||
{
|
{
|
||||||
ui->plainTextEditFormula->setFixedHeight(DIALOG_MAX_FORMULA_HEIGHT);
|
ui->plainTextEditFormula->setFixedHeight(DIALOG_MAX_FORMULA_HEIGHT);
|
||||||
|
@ -1150,6 +1153,9 @@ void TMainWindow::DeployFormula()
|
||||||
setUpdatesEnabled(false);
|
setUpdatesEnabled(false);
|
||||||
repaint();
|
repaint();
|
||||||
setUpdatesEnabled(true);
|
setUpdatesEnabled(true);
|
||||||
|
|
||||||
|
ui->plainTextEditFormula->setFocus();
|
||||||
|
ui->plainTextEditFormula->setTextCursor(cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user