File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -472,7 +472,15 @@ void QgsComposer::on_mActionExportAsPDF_triggered()
472472 if ( result != QDialog::Accepted ) return ;
473473
474474 QString myOutputFileNameQString = myQFileDialog->selectedFiles ().first ();
475- if ( myOutputFileNameQString == " " ) return ;
475+ if ( myOutputFileNameQString == " " )
476+ {
477+ return ;
478+ }
479+
480+ if ( !myOutputFileNameQString.endsWith ( " .pdf" , Qt::CaseInsensitive ) )
481+ {
482+ myOutputFileNameQString.append ( " .pdf" );
483+ }
476484
477485 myQSettings.setValue ( " /UI/lastSaveAsPdfFile" , myOutputFileNameQString );
478486
@@ -736,7 +744,15 @@ void QgsComposer::on_mActionExportAsSVG_triggered()
736744 if ( result != QDialog::Accepted ) return ;
737745
738746 QString myOutputFileNameQString = myQFileDialog->selectedFiles ().first ();
739- if ( myOutputFileNameQString == " " ) return ;
747+ if ( myOutputFileNameQString == " " )
748+ {
749+ return ;
750+ }
751+
752+ if ( !myOutputFileNameQString.endsWith ( " .svg" , Qt::CaseInsensitive ) )
753+ {
754+ myOutputFileNameQString.append ( " .svg" );
755+ }
740756
741757 myQSettings.setValue ( " /UI/lastSaveAsSvgFile" , myOutputFileNameQString );
742758
You can’t perform that action at this time.
0 commit comments