Skip to content

Commit

Permalink
Another default style handling fix for point cloud layers
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 27, 2020
1 parent 9fabf4b commit 17c83d7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/core/pointcloud/qgspointcloudlayer.cpp
Expand Up @@ -148,8 +148,6 @@ void QgsPointCloudLayer::setTransformContext( const QgsCoordinateTransformContex

void QgsPointCloudLayer::setDataSource( const QString &dataSource, const QString &baseName, const QString &provider, const QgsDataProvider::ProviderOptions &options, bool loadDefaultStyleFlag )
{
Q_UNUSED( loadDefaultStyleFlag )

if ( mDataProvider )
disconnect( mDataProvider.get(), &QgsPointCloudDataProvider::dataChanged, this, &QgsPointCloudLayer::dataChanged );

Expand Down Expand Up @@ -185,6 +183,12 @@ void QgsPointCloudLayer::setDataSource( const QString &dataSource, const QString

setCrs( mDataProvider->crs() );

if ( loadDefaultStyleFlag )
{
bool defaultLoadedFlag = false;
loadDefaultStyle( defaultLoadedFlag );
}

connect( mDataProvider.get(), &QgsPointCloudDataProvider::dataChanged, this, &QgsPointCloudLayer::dataChanged );

emit dataSourceChanged();
Expand Down

0 comments on commit 17c83d7

Please sign in to comment.