@@ -138,19 +138,23 @@ void QgsLayerPropertiesWidget::setExpressionContext( QgsExpressionContext *conte
138
138
139
139
void QgsLayerPropertiesWidget::populateLayerTypes ()
140
140
{
141
- QStringList types = QgsSymbolLayerV2Registry::instance ()->symbolLayersForType ( mSymbol ->type () );
141
+ QStringList symbolLayerIds = QgsSymbolLayerV2Registry::instance ()->symbolLayersForType ( mSymbol ->type () );
142
142
143
- for ( int i = 0 ; i < types. count (); i++ )
144
- cboLayerType->addItem ( QgsSymbolLayerV2Registry::instance ()->symbolLayerMetadata ( types[i] )->visibleName (), types[i] );
143
+ Q_FOREACH ( const QString& symbolLayerId, symbolLayerIds )
144
+ cboLayerType->addItem ( QgsSymbolLayerV2Registry::instance ()->symbolLayerMetadata ( symbolLayerId )->visibleName (), symbolLayerId );
145
145
146
146
if ( mSymbol ->type () == QgsSymbolV2::Fill )
147
147
{
148
- QStringList typesLine = QgsSymbolLayerV2Registry::instance ()->symbolLayersForType ( QgsSymbolV2::Line );
149
- for ( int i = 0 ; i < typesLine. count (); i++ )
148
+ QStringList lineLayerIds = QgsSymbolLayerV2Registry::instance ()->symbolLayersForType ( QgsSymbolV2::Line );
149
+ Q_FOREACH ( const QString& lineLayerId, lineLayerIds )
150
150
{
151
- QString visibleName = QgsSymbolLayerV2Registry::instance ()->symbolLayerMetadata ( typesLine[i] )->visibleName ();
152
- QString name = QString ( tr ( " Outline: %1" ) ).arg ( visibleName );
153
- cboLayerType->addItem ( name, typesLine[i] );
151
+ QgsSymbolLayerV2AbstractMetadata* layerInfo = QgsSymbolLayerV2Registry::instance ()->symbolLayerMetadata ( lineLayerId );
152
+ if ( layerInfo->type () != QgsSymbolV2::Hybrid )
153
+ {
154
+ QString visibleName = layerInfo->visibleName ();
155
+ QString name = QString ( tr ( " Outline: %1" ) ).arg ( visibleName );
156
+ cboLayerType->addItem ( name, lineLayerId );
157
+ }
154
158
}
155
159
}
156
160
}
0 commit comments