Skip to content

Commit 8c9f41c

Browse files
committedJan 17, 2014
Merge pull request #1086 from ahuarte47/Issue_9360
fix bug whole layer not rendered (when simplify geometry activated; fixes #9360)
2 parents 71360c3 + cc13f9d commit 8c9f41c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎src/core/qgsvectorlayer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -728,8 +728,8 @@ bool QgsVectorLayer::draw( QgsRenderContext& rendererContext )
728728
double sourceHypothenuse = sqrt( minimumSrcPoint.sqrDist( maximumSrcPoint ) );
729729
double targetHypothenuse = sqrt( minimumDstPoint.sqrDist( maximumDstPoint ) );
730730

731-
if ( sourceHypothenuse != 0 )
732-
map2pixelTol *= targetHypothenuse / sourceHypothenuse;
731+
if ( targetHypothenuse != 0 )
732+
map2pixelTol *= ( sourceHypothenuse / targetHypothenuse );
733733
}
734734

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

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

12641264
QgsFeatureIterator QgsVectorLayer::getFeatures( const QgsFeatureRequest& request )

‎src/core/qgsvectorlayerfeatureiterator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ bool QgsVectorLayerFeatureIterator::prepareSimplification( const QgsSimplifyMeth
455455
mEditGeometrySimplifier = NULL;
456456

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

0 commit comments

Comments
 (0)
Please sign in to comment.