Skip to content
Permalink
Browse files

More solid precision estimation

  • Loading branch information
m-kuhn committed Oct 3, 2018
1 parent d0728ef commit 29b1dd741b262217fa89d3ca45b2f164e173b21e
Showing with 10 additions and 2 deletions.
  1. +10 −2 src/app/qgsgeometryvalidationservice.cpp
@@ -176,9 +176,17 @@ void QgsGeometryValidationService::enableLayerChecks( QgsVectorLayer *layer )
return;
}

int precision = log10( layer->geometryOptions()->geometryPrecision() ) * -1;
if ( precision == 0 )
int precision = 0;
if ( layer->geometryOptions()->geometryPrecision() == 0 )
precision = 8;
else
{
precision = log10( layer->geometryOptions()->geometryPrecision() ) * -1;

if ( precision < 1 || precision > 13 )
precision = 8;
}

checkInformation.context = qgis::make_unique<QgsGeometryCheckContext>( precision, mProject->crs(), mProject->transformContext() );

QList<QgsGeometryCheck *> layerChecks;

0 comments on commit 29b1dd7

Please sign in to comment.
You can’t perform that action at this time.