Skip to content

Commit

Permalink
remove progress indication from symbology-ng rendering:
Browse files Browse the repository at this point in the history
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 1a7d9c7
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/core/qgsvectorlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1a7d9c7

Please sign in to comment.