@@ -2992,7 +2992,7 @@ void QgsLayoutDesignerDialog::exportReportToRaster()
2992
2992
QFileInfo fi ( fileNExt.first );
2993
2993
QString dir = fi.path ();
2994
2994
QString fileName = dir + ' /' + fi.baseName ();
2995
- QgsLayoutExporter::ExportResult result = QgsLayoutExporter::exportToImage ( dynamic_cast < QgsReport * >( mMasterLayout ), fileName, fileNExt.second , settings, error, feedback.get () );
2995
+ QgsLayoutExporter::ExportResult result = QgsLayoutExporter::exportToImage ( static_cast < QgsReport * >( mMasterLayout ), fileName, fileNExt.second , settings, error, feedback.get () );
2996
2996
QApplication::restoreOverrideCursor ();
2997
2997
2998
2998
switch ( result )
@@ -3107,7 +3107,7 @@ void QgsLayoutDesignerDialog::exportReportToSvg()
3107
3107
QFileInfo fi ( outputFileName );
3108
3108
QString outFile = fi.path () + ' /' + fi.baseName ();
3109
3109
QString dir = fi.path ();
3110
- QgsLayoutExporter::ExportResult result = QgsLayoutExporter::exportToSvg ( dynamic_cast < QgsReport * >( mMasterLayout ), outFile, svgSettings, error, feedback.get () );
3110
+ QgsLayoutExporter::ExportResult result = QgsLayoutExporter::exportToSvg ( static_cast < QgsReport * >( mMasterLayout ), outFile, svgSettings, error, feedback.get () );
3111
3111
3112
3112
QApplication::restoreOverrideCursor ();
3113
3113
switch ( result )
@@ -3238,7 +3238,7 @@ void QgsLayoutDesignerDialog::exportReportToPdf()
3238
3238
feedback->cancel ();
3239
3239
} );
3240
3240
3241
- QgsLayoutExporter::ExportResult result = QgsLayoutExporter::exportToPdf ( dynamic_cast < QgsReport * >( mMasterLayout ), outputFileName, pdfSettings, error, feedback.get () );
3241
+ QgsLayoutExporter::ExportResult result = QgsLayoutExporter::exportToPdf ( static_cast < QgsReport * >( mMasterLayout ), outputFileName, pdfSettings, error, feedback.get () );
3242
3242
3243
3243
switch ( result )
3244
3244
{
@@ -3335,7 +3335,7 @@ void QgsLayoutDesignerDialog::printReport()
3335
3335
} );
3336
3336
3337
3337
QString printerName = printer ()->printerName ();
3338
- switch ( QgsLayoutExporter::print ( dynamic_cast < QgsReport * >( mMasterLayout ), *printer (), printSettings, error, feedback.get () ) )
3338
+ switch ( QgsLayoutExporter::print ( static_cast < QgsReport * >( mMasterLayout ), *printer (), printSettings, error, feedback.get () ) )
3339
3339
{
3340
3340
case QgsLayoutExporter::Success:
3341
3341
{
@@ -3539,6 +3539,9 @@ void QgsLayoutDesignerDialog::createLayoutPropertiesWidget()
3539
3539
void QgsLayoutDesignerDialog::createAtlasWidget ()
3540
3540
{
3541
3541
QgsPrintLayout *printLayout = dynamic_cast < QgsPrintLayout * >( mMasterLayout );
3542
+ if ( !printLayout )
3543
+ return ;
3544
+
3542
3545
QgsLayoutAtlas *atlas = printLayout->atlas ();
3543
3546
QgsLayoutAtlasWidget *atlasWidget = new QgsLayoutAtlasWidget ( mAtlasDock , printLayout );
3544
3547
atlasWidget->setMessageBar ( mMessageBar );
0 commit comments