Skip to content

Commit

Permalink
set singleFile property inside the QgsLayoutAtlas constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Samweli authored and github-actions[bot] committed Aug 9, 2021
1 parent fdd931b commit b016a3c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/core/layout/qgslayoutatlas.cpp
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions src/gui/layout/qgslayoutatlaswidget.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit b016a3c

Please sign in to comment.