Skip to content

Commit cc15284

Browse files
committed
Deactivate progress bar when no nodes
1 parent dece451 commit cc15284

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core/pointcloud/qgspointcloudlayerprofilegenerator.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,10 @@ bool QgsPointCloudLayerProfileGenerator::generateProfile( const QgsProfileGenera
470470
}
471471
double rootErrorPixels = rootErrorInMapCoordinates / mapUnitsPerPixel; // in pixels
472472
const QVector<IndexedPointCloudNode> nodes = traverseTree( pc, pc->root(), maximumErrorPixels, rootErrorPixels, context.elevationRange() );
473+
if ( nodes.empty() )
474+
{
475+
return false;
476+
}
473477

474478
const double rootErrorInLayerCoordinates = rootNodeExtentLayerCoords.width() / pc->span();
475479
const double maxErrorInMapCoordinates = maximumErrorPixels * mapUnitsPerPixel;

0 commit comments

Comments
 (0)