Skip to content
Permalink
Browse files

Fix browser model issue identified by model test

  • Loading branch information
nyalldawson committed Feb 2, 2016
1 parent d4ea95e commit c6c8277ec828e7a018942907454a927e91bfc537
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/core/qgsbrowsermodel.cpp
@@ -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 );

0 comments on commit c6c8277

Please sign in to comment.
You can’t perform that action at this time.