mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 00:54:53 -07:00
bugfix
This commit is contained in:
parent
ebca375755
commit
9f35340188
11 changed files with 135 additions and 59 deletions
|
|
@ -8,7 +8,11 @@ GamesModel::~GamesModel()
|
|||
|
||||
QVariant GamesModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
if ((role != Qt::DisplayRole) || !index.isValid())
|
||||
if (!index.isValid())
|
||||
return QVariant();
|
||||
if (role == Qt::UserRole)
|
||||
return index.row();
|
||||
if (role != Qt::DisplayRole)
|
||||
return QVariant();
|
||||
if ((index.row() >= gameList.size()) || (index.column() >= columnCount()))
|
||||
return QVariant();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue