Skip to content

Commit

Permalink
Fix incorrect rowCount results in layout model
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and nirvn committed Mar 1, 2020
1 parent 595d483 commit 9c284e1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/core/layout/qgslayoutmodel.cpp
Expand Up @@ -102,17 +102,18 @@ int QgsLayoutModel::rowCount( const QModelIndex &parent ) const
return mItemsInScene.size() + 1;
}

#if 0
QGraphicsItem *parentItem = itemFromIndex( parent );

if ( !parentItem )
if ( parentItem )
{
return mItemsInScene.size() + 1;
}
else
{
//no children for now
// return child count for item
return 0;
}
#endif

//no children for now
return 0;
}

int QgsLayoutModel::columnCount( const QModelIndex &parent ) const
Expand Down

0 comments on commit 9c284e1

Please sign in to comment.