Check parent in rowCount/columnCount/canFetchMore

Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
This commit is contained in:
TheLastRar
2022-11-13 14:35:55 +00:00
parent 5558f3d2cc
commit fce323b945
20 changed files with 41 additions and 41 deletions

View File

@ -675,12 +675,12 @@ Qt::ItemFlags PackProfile::flags(const QModelIndex &index) const
int PackProfile::rowCount(const QModelIndex &parent) const
{
return d->components.size();
return parent.isValid() ? 0 : d->components.size();
}
int PackProfile::columnCount(const QModelIndex &parent) const
{
return NUM_COLUMNS;
return parent.isValid() ? 0 : NUM_COLUMNS;
}
void PackProfile::move(const int index, const MoveDirection direction)