Skip to content

Commit a7ab227

Browse files
authored
Merge pull request #65020 from qgis/backport-64988-to-release-3_44
[Backport release-3_44] Use default classification classes when there are no statistics
2 parents ec0571f + 8a5e56a commit a7ab227

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/gui/pointcloud/qgspointcloudclassifiedrendererwidget.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,16 @@ void QgsPointCloudClassifiedRendererWidget::addCategories()
527527
const QgsPointCloudCategoryList defaultLayerCategories = isClassificationAttribute ? QgsPointCloudRendererRegistry::classificationAttributeCategories( mLayer ) : QgsPointCloudCategoryList();
528528

529529
mBlockChangedSignal = true;
530+
531+
// If it is classification and we lack stats, lets use the full set of default categories
532+
if ( isClassificationAttribute && providerCategories.isEmpty() )
533+
{
534+
for ( const QgsPointCloudCategory &c : defaultLayerCategories )
535+
{
536+
providerCategories.append( c.value() );
537+
}
538+
}
539+
530540
for ( const int &providerCategory : std::as_const( providerCategories ) )
531541
{
532542
// does this category already exist?

0 commit comments

Comments
 (0)