Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix atlas export when file name contains multiple dots
Fixes #29980
  • Loading branch information
elpaso committed May 28, 2019
1 parent 26f8815 commit 63900d0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/layout/qgslayoutexporter.cpp
Expand Up @@ -344,7 +344,13 @@ QgsLayoutExporter::ExportResult QgsLayoutExporter::exportToImage( const QString
PageExportDetails pageDetails;
pageDetails.directory = fi.path();
pageDetails.baseName = fi.baseName();
pageDetails.extension = fi.completeSuffix();
pageDetails.extension = fi.suffix();
// Deal with multiple dots, issue GH-29980
const auto completeSuffix { fi.completeSuffix() };
if ( completeSuffix != pageDetails.extension )
{
pageDetails.baseName = pageDetails.baseName + '.' + completeSuffix.left( completeSuffix.length() - 1 - pageDetails.extension.length() );
}

LayoutContextPreviewSettingRestorer restorer( mLayout );
( void )restorer;
Expand Down

0 comments on commit 63900d0

Please sign in to comment.