Skip to content
Permalink
Browse files

Merge pull request #1086 from ahuarte47/Issue_9360

fix bug whole layer not rendered (when simplify geometry activated; fixes #9360)
  • Loading branch information
jef-n committed Jan 17, 2014
2 parents 71360c3 + cc13f9d commit 8c9f41cfa1e6e8cc6625a3436756e3b29754142c
Showing with 4 additions and 4 deletions.
  1. +3 −3 src/core/qgsvectorlayer.cpp
  2. +1 −1 src/core/qgsvectorlayerfeatureiterator.cpp
@@ -728,8 +728,8 @@ bool QgsVectorLayer::draw( QgsRenderContext& rendererContext )
double sourceHypothenuse = sqrt( minimumSrcPoint.sqrDist( maximumSrcPoint ) );
double targetHypothenuse = sqrt( minimumDstPoint.sqrDist( maximumDstPoint ) );

if ( sourceHypothenuse != 0 )
map2pixelTol *= targetHypothenuse / sourceHypothenuse;
if ( targetHypothenuse != 0 )
map2pixelTol *= ( sourceHypothenuse / targetHypothenuse );
}

QgsSimplifyMethod simplifyMethod;
@@ -1258,7 +1258,7 @@ bool QgsVectorLayer::setSubsetString( QString subset )

bool QgsVectorLayer::simplifyDrawingCanbeApplied( int simplifyHint ) const
{
return mDataProvider && !mEditBuffer && ( mSimplifyMethod.simplifyHints() & simplifyHint ) && ( !mCurrentRendererContext || mCurrentRendererContext->useRenderingOptimization() );
return mDataProvider && !mEditBuffer && ( hasGeometryType() && geometryType() != QGis::Point ) && ( mSimplifyMethod.simplifyHints() & simplifyHint ) && ( !mCurrentRendererContext || mCurrentRendererContext->useRenderingOptimization() );
}

QgsFeatureIterator QgsVectorLayer::getFeatures( const QgsFeatureRequest& request )
@@ -455,7 +455,7 @@ bool QgsVectorLayerFeatureIterator::prepareSimplification( const QgsSimplifyMeth
mEditGeometrySimplifier = NULL;

// setup simplification for edited geometries to fetch
if ( !( mRequest.flags() & QgsFeatureRequest::NoGeometry ) && simplifyMethod.methodType() != QgsSimplifyMethod::NoSimplification )
if ( !( mRequest.flags() & QgsFeatureRequest::NoGeometry ) && simplifyMethod.methodType() != QgsSimplifyMethod::NoSimplification && L->hasGeometryType() && L->geometryType() != QGis::Point )
{
mEditGeometrySimplifier = QgsSimplifyMethod::createGeometrySimplifier( simplifyMethod );
return mEditGeometrySimplifier != NULL;

0 comments on commit 8c9f41c

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