Skip to content
Permalink
Browse files

Add coverage check on atlas exports

Fixes #26144
  • Loading branch information
roya0045 authored and nyalldawson committed Mar 22, 2020
1 parent 4e043db commit 05ffd2db8d43c4aacb2510a46e55d36a002661d6
Showing with 27 additions and 0 deletions.
  1. +27 −0 src/app/layout/qgslayoutdesignerdialog.cpp
@@ -2651,6 +2651,15 @@ void QgsLayoutDesignerDialog::exportAtlasToRaster()
if ( !printAtlas || !printAtlas->enabled() )
return;

if ( printAtlas->coverageLayer() )
{
QMessageBox::warning( this, tr( "Export Atlas as Image" ),
tr( "Error: No coverage layer is set." ),
QMessageBox::Ok,
QMessageBox::Ok );
return;
}

// else, it has an atlas to render, so a directory must first be selected
if ( printAtlas->filenameExpression().isEmpty() )
{
@@ -2823,6 +2832,15 @@ void QgsLayoutDesignerDialog::exportAtlasToSvg()
if ( !printAtlas || !printAtlas->enabled() )
return;

if ( printAtlas->coverageLayer() )
{
QMessageBox::warning( this, tr( "Export Atlas as Image" ),
tr( "Error: No coverage layer is set." ),
QMessageBox::Ok,
QMessageBox::Ok );
return;
}

if ( containsWmsLayers() )
{
showWmsPrintingWarning();
@@ -2991,6 +3009,15 @@ void QgsLayoutDesignerDialog::exportAtlasToPdf()
if ( !printAtlas || !printAtlas->enabled() )
return;

if ( printAtlas->coverageLayer() )
{
QMessageBox::warning( this, tr( "Export Atlas as Image" ),
tr( "Error: No coverage layer is set." ),
QMessageBox::Ok,
QMessageBox::Ok );
return;
}

if ( containsWmsLayers() )
{
showWmsPrintingWarning();

0 comments on commit 05ffd2d

Please sign in to comment.
You can’t perform that action at this time.