Skip to content
Permalink
Browse files
remove progress indication from symbology-ng rendering:
sometimes featureCount() is expensive and moveover only applies when the canvas
covers the full layer extent, which is not always the case.



git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13548 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed May 22, 2010
1 parent 9813f0e commit 1a7d9c7af2602ef6f888a273dc607179d9c8526e
Showing with 7 additions and 8 deletions.
  1. +7 −8 src/core/qgsvectorlayer.cpp
@@ -706,7 +706,6 @@ void QgsVectorLayer::drawRendererV2( QgsRenderContext& rendererContext, bool lab
mRendererV2->startRender( rendererContext, this );

#ifndef Q_WS_MAC
int totalFeatures = pendingFeatureCount();
int featureCount = 0;
#endif //Q_WS_MAC

@@ -724,12 +723,12 @@ void QgsVectorLayer::drawRendererV2( QgsRenderContext& rendererContext, bool lab
if ( mUpdateThreshold > 0 && 0 == featureCount % mUpdateThreshold )
{
emit screenUpdateRequested();
emit drawingProgress( featureCount, totalFeatures );
// emit drawingProgress( featureCount, totalFeatures );
qApp->processEvents();
}
else if ( featureCount % 1000 == 0 )
{
emit drawingProgress( featureCount, totalFeatures );
// emit drawingProgress( featureCount, totalFeatures );
qApp->processEvents();
}
#endif //Q_WS_MAC
@@ -970,7 +969,7 @@ bool QgsVectorLayer::draw( QgsRenderContext& rendererContext )
mVertexMarkerOnlyForSelection = settings.value( "/qgis/digitizing/marker_only_for_selected", false ).toBool();
}

int totalFeatures = pendingFeatureCount();
// int totalFeatures = pendingFeatureCount();
int featureCount = 0;
QgsFeature fet;
QgsAttributeList attributes = mRenderer->classificationAttributes();
@@ -1003,16 +1002,16 @@ bool QgsVectorLayer::draw( QgsRenderContext& rendererContext )
if ( mUpdateThreshold > 0 && 0 == featureCount % mUpdateThreshold )
{
emit screenUpdateRequested();
emit drawingProgress( featureCount, totalFeatures );
// emit drawingProgress( featureCount, totalFeatures );
qApp->processEvents();
}
else if ( featureCount % 1000 == 0 )
{
emit drawingProgress( featureCount, totalFeatures );
// emit drawingProgress( featureCount, totalFeatures );
qApp->processEvents();
}
#else
Q_UNUSED( totalFeatures );
// #else
// Q_UNUSED( totalFeatures );
#endif //Q_WS_MAC

// check if feature is selected

0 comments on commit 1a7d9c7

Please sign in to comment.