mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-12 00:02:25 -04:00
[diagrams] When an unknown diagram type is encountered, don't crash, but instead fallback to known type
Avoids projects from a new qgis using a new diagram type crashing when opened in earlier qgis versions
This commit is contained in:
parent
249d38a522
commit
6db6ede362
@ -536,6 +536,11 @@ void QgsDiagramRenderer::_readXml( const QDomElement &elem, const QgsReadWriteCo
|
||||
{
|
||||
mDiagram.reset( new QgsHistogramDiagram() );
|
||||
}
|
||||
else
|
||||
{
|
||||
// unknown diagram type -- default to histograms
|
||||
mDiagram.reset( new QgsHistogramDiagram() );
|
||||
}
|
||||
mShowAttributeLegend = ( elem.attribute( QStringLiteral( "attributeLegend" ), QStringLiteral( "1" ) ) != QLatin1String( "0" ) );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user