Skip to content

Commit c7c5244

Browse files
committed
categorized renderer: also setup symbol render context for hashed symbols
1 parent f49f7ce commit c7c5244

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/core/symbology-ng/qgscategorizedsymbolrendererv2.cpp

+13-2
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@ QgsCategorizedSymbolRendererV2::QgsCategorizedSymbolRendererV2( const QString& a
162162
//trigger a detachment and copy of mCategories BUT that same method CAN be used to modify a symbol in place
163163
Q_FOREACH ( const QgsRendererCategoryV2& cat, categories )
164164
{
165-
if ( cat.symbol() )
165+
if ( !cat.symbol() )
166166
{
167-
QgsDebugMsg( "invalid symbol in a category! ignoring..." );
167+
QgsDebugMsg( QString( "invalid symbol in category %1 (%2)! ignoring..." ).arg( cat.value().toString(), cat.label() ) );
168168
}
169169
mCategories << cat;
170170
}
@@ -445,6 +445,12 @@ void QgsCategorizedSymbolRendererV2::startRender( QgsRenderContext& context, con
445445
mTempSymbols[ cat.symbol()] = tempSymbol;
446446
}
447447
}
448+
449+
Q_FOREACH ( QgsSymbolV2 *symbol, mSymbolHash.values() )
450+
{
451+
symbol->startRender( context, &fields );
452+
}
453+
448454
return;
449455
}
450456

@@ -455,6 +461,11 @@ void QgsCategorizedSymbolRendererV2::stopRender( QgsRenderContext& context )
455461
cat.symbol()->stopRender( context );
456462
}
457463

464+
Q_FOREACH ( QgsSymbolV2 *symbol, mSymbolHash.values() )
465+
{
466+
symbol->stopRender( context );
467+
}
468+
458469
// cleanup mTempSymbols
459470
QHash<QgsSymbolV2*, QgsSymbolV2*>::const_iterator it2 = mTempSymbols.constBegin();
460471
for ( ; it2 != mTempSymbols.constEnd(); ++it2 )

0 commit comments

Comments
 (0)