Skip to content
Permalink
Browse files
fix tests
  • Loading branch information
NEDJIMAbelgacem authored and wonder-sk committed Apr 8, 2021
1 parent 4a0230f commit 1a60a4562d18f778d43e3ec8072f3177a5815481
@@ -26,7 +26,7 @@ Encapsulates the render context for a 2D point cloud rendering operation.
public:

QgsPointCloudRenderContext( QgsRenderContext &context, const QgsVector3D &scale, const QgsVector3D &offset,
double zValueScale, double zValueFixedOffset, QgsFeedback *feedback );
double zValueScale, double zValueFixedOffset, QgsFeedback *feedback = 0 );
%Docstring
Constructor for QgsPointCloudRenderContext.

@@ -242,14 +242,15 @@ int QgsPointCloudLayerRenderer::renderNodesAsync( const QVector<IndexedPointClou
const int groupSize = 4;
for ( int groupIndex = 0; groupIndex < nodes.size(); groupIndex += groupSize )
{
if ( context.feedback()->isCanceled() )
if ( context.feedback() && context.feedback()->isCanceled() )
break;
// Async loading of nodes
const int currentGroupSize = std::min( std::max( nodes.size() - groupIndex, 0 ), groupSize );
QVector<QgsPointCloudBlockRequest *> blockRequests( currentGroupSize, nullptr );
QVector<bool> finishedLoadingBlock( currentGroupSize, false );
QEventLoop loop;
QObject::connect( context.feedback(), &QgsFeedback::canceled, &loop, &QEventLoop::quit );
if ( context.feedback() )
QObject::connect( context.feedback(), &QgsFeedback::canceled, &loop, &QEventLoop::quit );
// Note: All capture by reference warnings here shouldn't be an issue since we have an event loop, so locals won't be deallocated
for ( int i = 0; i < blockRequests.size(); ++i )
{
@@ -55,7 +55,7 @@ class CORE_EXPORT QgsPointCloudRenderContext
* taken from the point cloud index.
*/
QgsPointCloudRenderContext( QgsRenderContext &context, const QgsVector3D &scale, const QgsVector3D &offset,
double zValueScale, double zValueFixedOffset, QgsFeedback *feedback );
double zValueScale, double zValueFixedOffset, QgsFeedback *feedback = nullptr );

//! QgsPointCloudRenderContext cannot be copied.
QgsPointCloudRenderContext( const QgsPointCloudRenderContext &rh ) = delete;

0 comments on commit 1a60a45

Please sign in to comment.