mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-12 00:02:25 -04:00
Do not show the invalid geom warning if not necessary
If the geoms where originally invalid, do not show the warning.
This commit is contained in:
parent
08b6b6065a
commit
a3bf98d9a6
@ -8629,6 +8629,7 @@ void QgisApp::pasteFromClipboard( QgsMapLayer *destinationLayer )
|
|||||||
}
|
}
|
||||||
|
|
||||||
QgsGeometry geom = featureIt->geometry();
|
QgsGeometry geom = featureIt->geometry();
|
||||||
|
bool geomWasInvalid = geom.isEmpty() || geom.isNull( );
|
||||||
if ( featureIt->hasGeometry() )
|
if ( featureIt->hasGeometry() )
|
||||||
{
|
{
|
||||||
// convert geometry to match destination layer
|
// convert geometry to match destination layer
|
||||||
@ -8653,7 +8654,7 @@ void QgisApp::pasteFromClipboard( QgsMapLayer *destinationLayer )
|
|||||||
// avoid intersection if enabled in digitize settings
|
// avoid intersection if enabled in digitize settings
|
||||||
geom.avoidIntersections( QgsProject::instance()->avoidIntersectionsLayers() );
|
geom.avoidIntersections( QgsProject::instance()->avoidIntersectionsLayers() );
|
||||||
}
|
}
|
||||||
if ( geom.isEmpty() || geom.isNull( ) )
|
if ( ! geomWasInvalid && ( geom.isEmpty() || geom.isNull( ) ) )
|
||||||
invalidGeometriesCount++;
|
invalidGeometriesCount++;
|
||||||
|
|
||||||
// now create new feature using pasted feature as a template. This automatically handles default
|
// now create new feature using pasted feature as a template. This automatically handles default
|
||||||
|
Loading…
x
Reference in New Issue
Block a user