Skip to content
Permalink
Browse files

[fix #19870] correctly convert index to style category

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 3e8e6ba9cd152ff50bdb277d1690bf053eb945ba
Showing with 1 addition and 1 deletion.
  1. +1 −1 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

0 comments on commit 3e8e6ba

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