Skip to content
Permalink
Browse files

Fix incorrect warning message when turning off atlas preview

(cherry picked from commit 1b5e0ae)
  • Loading branch information
nyalldawson committed May 26, 2020
1 parent c12c1eb commit 461bec52548dd7e71a29807a38e230e5eef759d4
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/app/layout/qgslayoutdesignerdialog.cpp
@@ -4377,7 +4377,7 @@ void QgsLayoutDesignerDialog::atlasFeatureChanged( const QgsFeature &feature )
const QString atlasFeatureName = atlas->nameForPage( atlas->currentFeatureNumber() );
mView->setSectionLabel( atlasFeatureName );

if ( !feature.hasGeometry() || feature.geometry().isEmpty() )
if ( feature.isValid() && ( !feature.hasGeometry() || feature.geometry().isEmpty() ) )
{
// a little sanity check -- if there's any maps in this layout which are set to be atlas controlled,
// and we hit a feature with no geometry attached, then warn the user

0 comments on commit 461bec5

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