fix: Spreadsheet applies content/alias even when focus lost (#9836)

* fix: Spreadsheet applies alias even when focus lost

The original stylesheet behavior was that the alias or content fields
could be edited, but only after enter was pressed the field would
actually update. This change makes the field apply when focus is lost
on top of when enter is pressed. This makes it easier to enter the
alias of a lot of fields at once.
This commit is contained in:
Robbe De Greef
2023-07-19 16:15:54 +02:00
committed by GitHub
parent da604677d9
commit 4d34b3324d

View File

@@ -95,7 +95,7 @@ SheetView::SheetView(Gui::Document *pcDocument, App::DocumentObject *docObj, QWi
connect(delegate, &SpreadsheetDelegate::finishedWithKey, this, &SheetView::editingFinishedWithKey);
connect(ui->cellContent, &ExpressionLineEdit::returnPressed, this, [this]() {confirmContentChanged(ui->cellContent->text()); });
connect(ui->cellAlias, &ExpressionLineEdit::returnPressed, this, [this]() {confirmAliasChanged(ui->cellAlias->text()); });
connect(ui->cellAlias, &ExpressionLineEdit::editingFinished, this, [this]() {confirmAliasChanged(ui->cellAlias->text()); });
connect(ui->cellAlias, &LineEdit::textEdited, this, &SheetView::aliasChanged);
columnWidthChangedConnection = sheet->columnWidthChanged.connect(bind(&SheetView::resizeColumn, this, bp::_1, bp::_2));