Simplify connecting QItemSelection::currentRowChanged to PropertyProxyModel::activeRow

This commit is contained in:
eelke 2018-09-02 12:28:56 +02:00
parent 0cef509771
commit e8f81557bb
3 changed files with 10 additions and 11 deletions

View file

@ -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 &current, 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);