From ae215724dd6c5336dcbb263733c6830a24917963 Mon Sep 17 00:00:00 2001 From: Robbe De Greef Date: Wed, 19 Jul 2023 16:15:54 +0200 Subject: [PATCH] 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. --- src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp b/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp index 9b90bcfe04..3838b44521 100644 --- a/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp +++ b/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp @@ -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));