Skip to content

Commit

Permalink
[fix #19870] correctly convert index to style category
Browse files Browse the repository at this point in the history
the shift is already done in the list, so no need to hack
  • Loading branch information
3nids committed Sep 17, 2018
1 parent d11a13e commit 3e8e6ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/qgsmaplayerstylecategoriesmodel.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 3e8e6ba

Please sign in to comment.