mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Fix browser model issue identified by model test
This commit is contained in:
parent
d4ea95ea49
commit
c6c8277ec8
@ -337,6 +337,10 @@ void QgsBrowserModel::reload()
|
||||
|
||||
QModelIndex QgsBrowserModel::index( int row, int column, const QModelIndex &parent ) const
|
||||
{
|
||||
if ( column < 0 || column >= columnCount( parent ) ||
|
||||
row < 0 || row >= rowCount( parent ) )
|
||||
return QModelIndex();
|
||||
|
||||
QgsDataItem *p = dataItem( parent );
|
||||
const QVector<QgsDataItem*> &items = p ? p->children() : mRootItems;
|
||||
QgsDataItem *item = items.value( row, nullptr );
|
||||
|
Loading…
x
Reference in New Issue
Block a user