Skip to content
Permalink
Browse files
set singleFile property inside the QgsLayoutAtlas constructor
  • Loading branch information
Samweli authored and nyalldawson committed Aug 17, 2021
1 parent 5e4da4b commit a455a518a81f351394e6aa3d1ca50b539b5cef4b
Showing with 3 additions and 3 deletions.
  1. +3 −0 src/core/layout/qgslayoutatlas.cpp
  2. +0 −3 src/gui/layout/qgslayoutatlaswidget.cpp
@@ -34,6 +34,9 @@ QgsLayoutAtlas::QgsLayoutAtlas( QgsLayout *layout )

//listen out for layer removal
connect( mLayout->project(), static_cast < void ( QgsProject::* )( const QStringList & ) >( &QgsProject::layersWillBeRemoved ), this, &QgsLayoutAtlas::removeLayers );

if ( mLayout->customProperty( QStringLiteral( "singleFile" ) ).isNull() )
mLayout->setCustomProperty( QStringLiteral( "singleFile" ), true );
}

QString QgsLayoutAtlas::stringType() const
@@ -392,9 +392,6 @@ void QgsLayoutAtlasWidget::updateGuiElements()
mAtlasFilenamePatternEdit->setText( mAtlas->filenameExpression() );
mAtlasHideCoverageCheckBox->setCheckState( mAtlas->hideCoverage() ? Qt::Checked : Qt::Unchecked );

if ( mLayout->customProperty( QStringLiteral( "singleFile" ) ).isNull() )
mLayout->setCustomProperty( QStringLiteral( "singleFile" ), true );

bool singleFile = mLayout->customProperty( QStringLiteral( "singleFile" ) ).toBool();
mAtlasSingleFileCheckBox->setCheckState( singleFile ? Qt::Checked : Qt::Unchecked );
mAtlasFilenamePatternEdit->setEnabled( !singleFile );

0 comments on commit a455a51

Please sign in to comment.