File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 19
19
#include " qgslayoutitemregistry.h"
20
20
#include " qgssettings.h"
21
21
#include " qgisapp.h"
22
+ #include " qgsfileutils.h"
22
23
#include " qgslogger.h"
23
24
#include " qgslayout.h"
24
25
#include " qgslayoutappmenuprovider.h"
@@ -1476,7 +1477,7 @@ void QgsLayoutDesignerDialog::exportToRaster()
1476
1477
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
1477
1478
#endif
1478
1479
1479
- QString outputFileName;
1480
+ QString outputFileName = QgsFileUtils::stringToSafeFilename ( mLayout -> name () ) ;
1480
1481
#if 0 //TODO
1481
1482
if ( atlasMap->enabled() && mComposition->atlasMode() == QgsComposition::PreviewAtlas )
1482
1483
{
@@ -1596,7 +1597,7 @@ void QgsLayoutDesignerDialog::exportToPdf()
1596
1597
else
1597
1598
{
1598
1599
#endif
1599
- outputFileName = file.path ();
1600
+ outputFileName = file.path () + ' / ' + QgsFileUtils::stringToSafeFilename ( mLayout -> name () ) + QStringLiteral ( " .pdf " ) ;
1600
1601
#if 0 //TODO
1601
1602
}
1602
1603
#endif
@@ -1685,7 +1686,7 @@ void QgsLayoutDesignerDialog::exportToSvg()
1685
1686
QgsSettings settings;
1686
1687
QString lastUsedFile = settings.value ( QStringLiteral ( " UI/lastSaveAsSvgFile" ), QStringLiteral ( " qgis.svg" ) ).toString ();
1687
1688
QFileInfo file ( lastUsedFile );
1688
- QString outputFileName;
1689
+ QString outputFileName = QgsFileUtils::stringToSafeFilename ( mLayout -> name () ) ;
1689
1690
1690
1691
#if 0 // TODO
1691
1692
if ( hasAnAtlas && !atlasOnASingleFile &&
@@ -1696,7 +1697,7 @@ void QgsLayoutDesignerDialog::exportToSvg()
1696
1697
else
1697
1698
{
1698
1699
#endif
1699
- outputFileName = file.path ();
1700
+ outputFileName = file.path () + ' / ' + QgsFileUtils::stringToSafeFilename ( mLayout -> name () ) + QStringLiteral ( " .svg " ) ;
1700
1701
#if 0 //TODO
1701
1702
}
1702
1703
#endif
You can’t perform that action at this time.
0 commit comments