Spreadsheet: Fix bug in content and alias lineedits
The two line edit widgets above the spreadsheet, one for exiting the cell contents and one for editing the alias, were set to use the same editing widget as the individual spreadsheet cells. Once that widget was refactored to handle tab/enter behavior it was no longer the correct widget for those elements. This commit changes them to Gui::ExpressionLineEdit widgets instead, so that the Enter key works correctly for them again.
This commit is contained in:
@@ -99,10 +99,8 @@ SheetView::SheetView(Gui::Document *pcDocument, App::DocumentObject *docObj, QWi
|
||||
this, SLOT(rowResized(int, int, int)));
|
||||
|
||||
connect(delegate, &SpreadsheetDelegate::finishedWithKey, this, &SheetView::editingFinishedWithKey);
|
||||
connect(ui->cellContent, &LineEdit::finishedWithKey, this, [this](int, Qt::KeyboardModifiers) {confirmContentChanged(ui->cellContent->text()); });
|
||||
connect(ui->cellContent, &LineEdit::returnPressed, this, [this]() {confirmContentChanged(ui->cellContent->text()); });
|
||||
connect(ui->cellAlias, &LineEdit::finishedWithKey, this, [this](int, Qt::KeyboardModifiers) {confirmAliasChanged(ui->cellAlias->text()); });
|
||||
connect(ui->cellAlias, &LineEdit::returnPressed, this, [this]() {confirmAliasChanged(ui->cellAlias->text()); });
|
||||
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, &LineEdit::textEdited, this, &SheetView::aliasChanged);
|
||||
|
||||
columnWidthChangedConnection = sheet->columnWidthChanged.connect(bind(&SheetView::resizeColumn, this, bp::_1, bp::_2));
|
||||
|
||||
Reference in New Issue
Block a user