mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
[fix #19870] correctly convert index to style category
the shift is already done in the list, so no need to hack
This commit is contained in:
parent
d11a13eae3
commit
3e8e6ba9cd
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user