diff --git a/src/app/qgsclipboard.cpp b/src/app/qgsclipboard.cpp index 484129ebfbcc..af0dd63622ba 100644 --- a/src/app/qgsclipboard.cpp +++ b/src/app/qgsclipboard.cpp @@ -122,11 +122,19 @@ void QgsClipboard::replaceWithCopyOf( QgsFeatureStore &featureStore, QgsVectorLa void QgsClipboard::generateClipboardText( QString &textContent, QString &htmlContent ) const { - const CopyFormat format = QgsSettings().enumValue( QStringLiteral( "qgis/copyFeatureFormat" ), AttributesWithWKT ); + CopyFormat format = QgsSettings().enumValue( QStringLiteral( "qgis/copyFeatureFormat" ), AttributesWithWKT ); textContent.clear(); htmlContent.clear(); + if ( QgsVectorLayer *vectorLayer = qobject_cast( mFeatureLayer.data() ) ) + { + if ( vectorLayer->geometryType() == Qgis::GeometryType::Null ) + { + format = AttributesOnly; + } + } + switch ( format ) { case AttributesOnly: