Skip to content
Permalink
Browse files

Revert change of rule-based renderer identifier as it breaks project …

…files
  • Loading branch information
wonder-sk committed Sep 15, 2014
1 parent 3c66bcf commit 48db9a218db97578d6111d70623e2cfa1c41d1a9
@@ -450,7 +450,7 @@ QgsInvertedPolygonRenderer* QgsInvertedPolygonRenderer::convertFromRenderer( con
if ( renderer->type() == "singleSymbol" ||
renderer->type() == "categorizedSymbol" ||
renderer->type() == "graduatedSymbol" ||
renderer->type() == "ruleRenderer" )
renderer->type() == "RuleRenderer" )
{
return new QgsInvertedPolygonRenderer( renderer->clone() );
}
@@ -528,7 +528,7 @@ QgsPointDisplacementRenderer* QgsPointDisplacementRenderer::convertFromRenderer(
if ( renderer->type() == "singleSymbol" ||
renderer->type() == "categorizedSymbol" ||
renderer->type() == "graduatedSymbol" ||
renderer->type() == "ruleRenderer" )
renderer->type() == "RuleRenderer" )
{
QgsPointDisplacementRenderer* pointRenderer = new QgsPointDisplacementRenderer();
pointRenderer->setEmbeddedRenderer( renderer->clone() );
@@ -467,7 +467,7 @@ QgsFeatureRendererV2* QgsFeatureRendererV2::loadSld( const QDomNode &node, QGis:
QString rendererType;
if ( needRuleRenderer )
{
rendererType = "ruleRenderer";
rendererType = "RuleRenderer";
}
else
{
@@ -38,7 +38,7 @@ QgsRendererV2Registry::QgsRendererV2Registry()
QObject::tr( "Graduated" ),
QgsGraduatedSymbolRendererV2::create ) );

addRenderer( new QgsRendererV2Metadata( "ruleRenderer",
addRenderer( new QgsRendererV2Metadata( "RuleRenderer",
QObject::tr( "Rule-based" ),
QgsRuleBasedRendererV2::create,
QgsRuleBasedRendererV2::createFromSld ) );
@@ -739,12 +739,12 @@ QgsRuleBasedRendererV2::Rule* QgsRuleBasedRendererV2::Rule::createFromSld( QDomE
/////////////////////

QgsRuleBasedRendererV2::QgsRuleBasedRendererV2( QgsRuleBasedRendererV2::Rule* root )
: QgsFeatureRendererV2( "ruleRenderer" ), mRootRule( root )
: QgsFeatureRendererV2( "RuleRenderer" ), mRootRule( root )
{
}

QgsRuleBasedRendererV2::QgsRuleBasedRendererV2( QgsSymbolV2* defaultSymbol )
: QgsFeatureRendererV2( "ruleRenderer" )
: QgsFeatureRendererV2( "RuleRenderer" )
{
mRootRule = new Rule( NULL ); // root has no symbol, no filter etc - just a container
mRootRule->appendChild( new Rule( defaultSymbol ) );
@@ -1058,7 +1058,7 @@ QgsSymbolV2List QgsRuleBasedRendererV2::symbolsForFeature( QgsFeature& feat )

QgsRuleBasedRendererV2* QgsRuleBasedRendererV2::convertFromRenderer( const QgsFeatureRendererV2* renderer )
{
if ( renderer->type() == "ruleRenderer" )
if ( renderer->type() == "RuleRenderer" )
{
return dynamic_cast<QgsRuleBasedRendererV2*>( renderer->clone() );
}
@@ -65,7 +65,7 @@ static void _initRendererWidgetFunctions()
_initRenderer( "singleSymbol", QgsSingleSymbolRendererV2Widget::create, "rendererSingleSymbol.png" );
_initRenderer( "categorizedSymbol", QgsCategorizedSymbolRendererV2Widget::create, "rendererCategorizedSymbol.png" );
_initRenderer( "graduatedSymbol", QgsGraduatedSymbolRendererV2Widget::create, "rendererGraduatedSymbol.png" );
_initRenderer( "ruleRenderer", QgsRuleBasedRendererV2Widget::create );
_initRenderer( "RuleRenderer", QgsRuleBasedRendererV2Widget::create );
_initRenderer( "pointDisplacement", QgsPointDisplacementRendererWidget::create );
_initRenderer( "invertedPolygonRenderer", QgsInvertedPolygonRendererWidget::create );
initialized = true;

0 comments on commit 48db9a2

Please sign in to comment.
You can’t perform that action at this time.