Skip to content
Permalink
Browse files
setRenderer(V2) also updates V2 renderer flag
  • Loading branch information
jef-n committed Feb 9, 2012
1 parent 2cea349 commit d52905ccc2c8f247c12b8a9fa7f9519fb6b9db4b
Showing with 10 additions and 4 deletions.
  1. +10 −4 src/core/qgsvectorlayer.cpp
@@ -1297,13 +1297,14 @@ const QgsRenderer* QgsVectorLayer::renderer() const
return mRenderer;
}

void QgsVectorLayer::setRenderer( QgsRenderer * r )
void QgsVectorLayer::setRenderer( QgsRenderer *r )
{
if ( !hasGeometryType() )
return;

if ( r != mRenderer )
{
setUsingRendererV2( false );
delete mRenderer;
mRenderer = r;
}
@@ -4634,13 +4635,18 @@ QgsFeatureRendererV2* QgsVectorLayer::rendererV2()
{
return mRendererV2;
}
void QgsVectorLayer::setRendererV2( QgsFeatureRendererV2* r )

void QgsVectorLayer::setRendererV2( QgsFeatureRendererV2 *r )
{
if ( !hasGeometryType() )
return;

delete mRendererV2;
mRendererV2 = r;
if ( r != mRendererV2 )
{
setUsingRendererV2( true );
delete mRendererV2;
mRendererV2 = r;
}
}
bool QgsVectorLayer::isUsingRendererV2()
{

0 comments on commit d52905c

Please sign in to comment.