Skip to content
Permalink
Browse files
set more appropriate layer name
  • Loading branch information
NEDJIMAbelgacem authored and wonder-sk committed Apr 8, 2021
1 parent 70f69c4 commit d8a9e8a4afa2563f91f3a14c6e11abfa4f231c43
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/gui/providers/qgspointcloudsourceselect.cpp
@@ -104,7 +104,13 @@ void QgsPointCloudSourceSelect::addButtonClicked()
const QList< QgsProviderRegistry::ProviderCandidateDetails > preferredProviders = QgsProviderRegistry::instance()->preferredProvidersForUri( mPath );
// maybe we should raise an assert if preferredProviders size is 0 or >1? Play it safe for now...
if ( !preferredProviders.empty() )
emit addPointCloudLayer( mPath, QFileInfo( mPath ).baseName(), preferredProviders.at( 0 ).metadata()->key() ) ;
{
QString baseName = QStringLiteral( "remote ept layer" );
QStringList seperatedPath = mPath.split( '/' );
if ( seperatedPath.size() >= 2 )
baseName = seperatedPath[ seperatedPath.size() - 2 ];
emit addPointCloudLayer( mPath, baseName, preferredProviders.at( 0 ).metadata()->key() ) ;
}
}
}

0 comments on commit d8a9e8a

Please sign in to comment.