Skip to content
Permalink
Browse files
also report layer error when exporting point clouds
  • Loading branch information
uclaros authored and nyalldawson committed Oct 4, 2022
1 parent ffbd8a8 commit 8212a536b1c56f04f1518222565ac217d796c3a4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
@@ -8446,12 +8446,17 @@ QString QgisApp::saveAsPointCloudLayer( QgsPointCloudLayer *pclayer )
QgsMapLayer *ml = exp->takeExportedLayer();
if ( ! ml->isValid() )
{
visibleMessageBar()->pushMessage( tr( "Export failed" ),
tr( "A problem occurred while exporting: %1" ).arg( exp->lastError() ),
Qgis::MessageLevel::Warning );
if ( ! exp->lastError().isEmpty() )
visibleMessageBar()->pushMessage( tr( "Export failed" ),
tr( "A problem occurred while exporting: %1" ).arg( exp->lastError() ),
Qgis::MessageLevel::Warning );
else
visibleMessageBar()->pushMessage( tr( "Cannot open file" ),
tr( "Cannot open exported file: %1" ).arg( ml->error().summary() ),
Qgis::MessageLevel::Warning );
}

if ( addToCanvas )
if ( addToCanvas && ml->isValid() )
QgsProject::instance()->addMapLayer( ml );
else
delete ml;
@@ -296,7 +296,6 @@ bool QgsPdalProvider::load( const QString &uri )
appendError( errorString );
return false;
}

}

QString QgsPdalProviderMetadata::sFilterString;

0 comments on commit 8212a53

Please sign in to comment.