File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,8 @@ void QgsRendererV2Widget::changeSymbolWidth()
137
137
QList<QgsSymbolV2*>::iterator symbolIt = symbolList.begin ();
138
138
for ( ; symbolIt != symbolList.end (); ++symbolIt )
139
139
{
140
- dynamic_cast <QgsLineSymbolV2*>( *symbolIt )->setWidth ( dlg.mSpinBox ->value () );
140
+ if (( *symbolIt )->type () == QgsSymbolV2::Line )
141
+ static_cast <QgsLineSymbolV2*>( *symbolIt )->setWidth ( dlg.mSpinBox ->value () );
141
142
}
142
143
}
143
144
refreshSymbolView ();
@@ -161,7 +162,8 @@ void QgsRendererV2Widget::changeSymbolSize()
161
162
QList<QgsSymbolV2*>::iterator symbolIt = symbolList.begin ();
162
163
for ( ; symbolIt != symbolList.end (); ++symbolIt )
163
164
{
164
- dynamic_cast <QgsMarkerSymbolV2*>( *symbolIt )->setSize ( dlg.mSpinBox ->value () );
165
+ if (( *symbolIt )->type () == QgsSymbolV2::Marker )
166
+ static_cast <QgsMarkerSymbolV2*>( *symbolIt )->setSize ( dlg.mSpinBox ->value () );
165
167
}
166
168
}
167
169
refreshSymbolView ();
@@ -185,7 +187,8 @@ void QgsRendererV2Widget::changeSymbolAngle()
185
187
QList<QgsSymbolV2*>::iterator symbolIt = symbolList.begin ();
186
188
for ( ; symbolIt != symbolList.end (); ++symbolIt )
187
189
{
188
- dynamic_cast <QgsMarkerSymbolV2*>( *symbolIt )->setAngle ( dlg.mSpinBox ->value () );
190
+ if (( *symbolIt )->type () == QgsSymbolV2::Marker )
191
+ static_cast <QgsMarkerSymbolV2*>( *symbolIt )->setAngle ( dlg.mSpinBox ->value () );
189
192
}
190
193
}
191
194
refreshSymbolView ();
You can’t perform that action at this time.
0 commit comments