Skip to content

Commit 3e8e6ba

Browse files
committed
[fix #19870] correctly convert index to style category
the shift is already done in the list, so no need to hack
1 parent d11a13e commit 3e8e6ba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/app/qgsmaplayerstylecategoriesmodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void QgsMapLayerStyleCategoriesModel::setShowAllCategories( bool showAll )
4747

4848
QgsMapLayer::StyleCategory QgsMapLayerStyleCategoriesModel::index2category( const QModelIndex &index ) const
4949
{
50-
return mCategoryList.at( index.row() - ( mShowAllCategories ? 1 : 0 ) );
50+
return mCategoryList.at( index.row() );
5151
}
5252

5353
int QgsMapLayerStyleCategoriesModel::rowCount( const QModelIndex & ) const

0 commit comments

Comments
 (0)