diff --git a/src/app/qgsmaplayerstylecategoriesmodel.cpp b/src/app/qgsmaplayerstylecategoriesmodel.cpp index 8904dd80c07..131876a01a6 100644 --- a/src/app/qgsmaplayerstylecategoriesmodel.cpp +++ b/src/app/qgsmaplayerstylecategoriesmodel.cpp @@ -47,7 +47,7 @@ void QgsMapLayerStyleCategoriesModel::setShowAllCategories( bool showAll ) QgsMapLayer::StyleCategory QgsMapLayerStyleCategoriesModel::index2category( const QModelIndex &index ) const { - return mCategoryList.at( index.row() - ( mShowAllCategories ? 1 : 0 ) ); + return mCategoryList.at( index.row() ); } int QgsMapLayerStyleCategoriesModel::rowCount( const QModelIndex & ) const