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

@ -97,8 +97,8 @@ QVariant PropertyProxyModel::data(const QModelIndex &proxyIndex, int role) const
return QVariant();
}
void PropertyProxyModel::setActiveRow(int row)
void PropertyProxyModel::setActiveRow(const QModelIndex &row)
{
activeRow = row;
activeRow = row.isValid() ? row.row() : -1;
emit dataChanged(index(0, valueColumn), index(rowCount(QModelIndex()), valueColumn), QVector<int>() << Qt::DisplayRole);
}