Skip to content

Commit b629966

Browse files
author
mhugent
committedApr 13, 2011
Fix for bug #3685, take2
git-svn-id: http://svn.osgeo.org/qgis/trunk@15696 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 8a31ca5 commit b629966

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed
 

‎src/core/qgsvectorlayer.cpp

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,12 @@ void QgsVectorLayer::drawRendererV2( QgsRenderContext& rendererContext, bool lab
757757
// render feature
758758
mRendererV2->renderFeature( fet, rendererContext, -1, sel, drawMarker );
759759

760+
if ( mEditable )
761+
{
762+
// Cache this for the use of (e.g.) modifying the feature's uncommitted geometry.
763+
mCachedGeometries[fet.id()] = *fet.geometry();
764+
}
765+
760766
// labeling - register feature
761767
if ( mRendererV2->symbolForFeature( fet ) != NULL )
762768
{
@@ -769,12 +775,6 @@ void QgsVectorLayer::drawRendererV2( QgsRenderContext& rendererContext, bool lab
769775
rendererContext.labelingEngine()->registerDiagramFeature( this, fet, rendererContext );
770776
}
771777
}
772-
773-
if ( mEditable )
774-
{
775-
// Cache this for the use of (e.g.) modifying the feature's uncommitted geometry.
776-
mCachedGeometries[fet.id()] = *fet.geometry();
777-
}
778778
}
779779
catch ( const QgsCsException &cse )
780780
{
@@ -834,6 +834,12 @@ void QgsVectorLayer::drawRendererV2Levels( QgsRenderContext& rendererContext, bo
834834
}
835835
features[sym].append( fet );
836836

837+
if ( mEditable )
838+
{
839+
// Cache this for the use of (e.g.) modifying the feature's uncommitted geometry.
840+
mCachedGeometries[fet.id()] = *fet.geometry();
841+
}
842+
837843
if ( mRendererV2->symbolForFeature( fet ) != NULL )
838844
{
839845
if ( labeling )
@@ -846,11 +852,6 @@ void QgsVectorLayer::drawRendererV2Levels( QgsRenderContext& rendererContext, bo
846852
}
847853
}
848854

849-
if ( mEditable )
850-
{
851-
// Cache this for the use of (e.g.) modifying the feature's uncommitted geometry.
852-
mCachedGeometries[fet.id()] = *fet.geometry();
853-
}
854855
#ifndef Q_WS_MAC
855856
++featureCount;
856857
#endif //Q_WS_MAC

0 commit comments

Comments
 (0)