Select the pointed table row when right clicking on the vertical header

This makes sense from the user point of view, since it remarks that the
options from the menu applies to that row. This change will also fix the
different behaviour of the "Delete record" and "Duplicate record" in the
context menu. See issue #1283
This commit is contained in:
mgrojo
2018-01-05 18:25:57 +01:00
parent 35b8ac7771
commit bbac655499

View File

@@ -2447,6 +2447,8 @@ void MainWindow::showRecordPopupMenu(const QPoint& pos)
if (row == -1)
return;
ui->dataTable->selectRow(row);
QMenu popupRecordMenu(this);
QAction* action = new QAction("Duplicate record", &popupRecordMenu);
// Set shortcut for documentation purposes (the actual functional shortcut is not set here)