mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
use dynamic_cast
This commit is contained in:
parent
2fd017500b
commit
b088ef2bc7
@ -194,7 +194,7 @@ void QgsDoubleBoxScaleBarRenderer::draw( QgsRenderContext &context, const QgsSca
|
||||
|
||||
bool QgsDoubleBoxScaleBarRenderer::applyDefaultSettings( QgsScaleBarSettings &settings ) const
|
||||
{
|
||||
QgsSimpleFillSymbolLayer *fill = qgis::down_cast< QgsSimpleFillSymbolLayer * >( settings.fillSymbol()->symbolLayers().at( 0 ) );
|
||||
QgsSimpleFillSymbolLayer *fill = dynamic_cast< QgsSimpleFillSymbolLayer * >( settings.fillSymbol()->symbolLayers().at( 0 ) );
|
||||
|
||||
// restore the fill symbols by default
|
||||
if ( fill && fill->brushStyle() == Qt::NoBrush )
|
||||
|
@ -160,7 +160,7 @@ void QgsSingleBoxScaleBarRenderer::draw( QgsRenderContext &context, const QgsSca
|
||||
|
||||
bool QgsSingleBoxScaleBarRenderer::applyDefaultSettings( QgsScaleBarSettings &settings ) const
|
||||
{
|
||||
QgsSimpleFillSymbolLayer *fill = qgis::down_cast< QgsSimpleFillSymbolLayer * >( settings.fillSymbol()->symbolLayers().at( 0 ) );
|
||||
QgsSimpleFillSymbolLayer *fill = dynamic_cast< QgsSimpleFillSymbolLayer * >( settings.fillSymbol()->symbolLayers().at( 0 ) );
|
||||
|
||||
// restore the fill symbols by default
|
||||
if ( fill && fill->brushStyle() == Qt::NoBrush )
|
||||
|
Loading…
x
Reference in New Issue
Block a user