Skip to content

Commit

Permalink
Restore atlas raster format handling
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 5, 2018
1 parent 5a782f4 commit 409d10f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
10 changes: 3 additions & 7 deletions src/app/layout/qgslayoutatlaswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,9 @@ void QgsLayoutAtlasWidget::mAtlasSortFeatureDirectionButton_clicked()

void QgsLayoutAtlasWidget::changeFileFormat()
{
#if 0 //TODO
QgsAtlasComposition *atlasMap = mAtlas;
atlasMap->setFileFormat( mAtlasFileFormat->currentText() );
#endif
mLayout->setCustomProperty( QStringLiteral( "atlasRasterFormat" ), mAtlasFileFormat->currentText() );
}

void QgsLayoutAtlasWidget::updateGuiElements()
{
blockAllSignals( true );
Expand Down Expand Up @@ -353,9 +351,7 @@ void QgsLayoutAtlasWidget::updateGuiElements()
mAtlasFeatureFilterEdit->setEnabled( mAtlas->filterFeatures() );
mAtlasFeatureFilterButton->setEnabled( mAtlas->filterFeatures() );

#if 0 //TODO
mAtlasFileFormat->setCurrentIndex( mAtlasFileFormat->findText( mAtlas->fileFormat() ) );
#endif
mAtlasFileFormat->setCurrentIndex( mAtlasFileFormat->findText( mLayout->customProperty( QStringLiteral( "atlasRasterFormat" ), QStringLiteral( "png" ) ).toString() ) );

blockAllSignals( false );
}
Expand Down
5 changes: 1 addition & 4 deletions src/app/layout/qgslayoutdesignerdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2058,10 +2058,7 @@ void QgsLayoutDesignerDialog::exportAtlasToRaster()
return;
}
QString dir = files.at( 0 );
#if 0 //TODO
QString format = printAtlas->fileFormat();
#endif
QString format = "png";
QString format = mLayout->customProperty( QStringLiteral( "atlasRasterFormat" ), QStringLiteral( "png" ) ).toString();
QString fileExt = '.' + format;
if ( dir.isEmpty() )
{
Expand Down

0 comments on commit 409d10f

Please sign in to comment.