Skip to content

Commit

Permalink
Fix for bug #3685, take2
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15696 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Apr 13, 2011
1 parent 882be41 commit 45cbf9f
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/core/qgsvectorlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,12 @@ void QgsVectorLayer::drawRendererV2( QgsRenderContext& rendererContext, bool lab
// render feature
mRendererV2->renderFeature( fet, rendererContext, -1, sel, drawMarker );

if ( mEditable )
{
// Cache this for the use of (e.g.) modifying the feature's uncommitted geometry.
mCachedGeometries[fet.id()] = *fet.geometry();
}

// labeling - register feature
if ( mRendererV2->symbolForFeature( fet ) != NULL )
{
Expand All @@ -769,12 +775,6 @@ void QgsVectorLayer::drawRendererV2( QgsRenderContext& rendererContext, bool lab
rendererContext.labelingEngine()->registerDiagramFeature( this, fet, rendererContext );
}
}

if ( mEditable )
{
// Cache this for the use of (e.g.) modifying the feature's uncommitted geometry.
mCachedGeometries[fet.id()] = *fet.geometry();
}
}
catch ( const QgsCsException &cse )
{
Expand Down Expand Up @@ -834,6 +834,12 @@ void QgsVectorLayer::drawRendererV2Levels( QgsRenderContext& rendererContext, bo
}
features[sym].append( fet );

if ( mEditable )
{
// Cache this for the use of (e.g.) modifying the feature's uncommitted geometry.
mCachedGeometries[fet.id()] = *fet.geometry();
}

if ( mRendererV2->symbolForFeature( fet ) != NULL )
{
if ( labeling )
Expand All @@ -846,11 +852,6 @@ void QgsVectorLayer::drawRendererV2Levels( QgsRenderContext& rendererContext, bo
}
}

if ( mEditable )
{
// Cache this for the use of (e.g.) modifying the feature's uncommitted geometry.
mCachedGeometries[fet.id()] = *fet.geometry();
}
#ifndef Q_WS_MAC
++featureCount;
#endif //Q_WS_MAC
Expand Down

0 comments on commit 45cbf9f

Please sign in to comment.