Simplify connecting QItemSelection::currentRowChanged to PropertyProxyModel::activeRow
This commit is contained in:
parent
0cef509771
commit
e8f81557bb
3 changed files with 10 additions and 11 deletions
|
|
@ -62,14 +62,8 @@ TablesPage::TablesPage(MainWindow *parent)
|
|||
ui->tablePropertiesTable->setModel(property_model);
|
||||
ui->tablePropertiesTable->setItemDelegate(pglab_delegate);
|
||||
|
||||
connect(ui->tableListTable->selectionModel(), &QItemSelectionModel::currentChanged,
|
||||
[property_model](const QModelIndex ¤t, const QModelIndex &) {
|
||||
int row = -1;
|
||||
if (current.isValid())
|
||||
row = current.row();
|
||||
|
||||
property_model->setActiveRow(row);
|
||||
});
|
||||
connect(ui->tableListTable->selectionModel(), &QItemSelectionModel::currentRowChanged,
|
||||
property_model, &PropertyProxyModel::setActiveRow);
|
||||
|
||||
|
||||
//m_namespaceFilterWidget = new NamespaceFilterWidget(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue