Skip to content

Commit

Permalink
Append suffix for composer template file. Fixes bug #1708
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@10868 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jun 1, 2009
1 parent 0862fd1 commit 6f8f05b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/composer/qgscomposer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -777,8 +777,13 @@ void QgsComposer::on_mActionSaveAsTemplate_activated( void )
return;
}

//save directory
QFileInfo saveFileInfo( saveFileName );
//check if suffix has been added
if(saveFileInfo.suffix().isEmpty())
{
QString saveFileNameWithSuffix = saveFileName.append(".qpt");
saveFileInfo = QFileInfo(saveFileNameWithSuffix);
}
settings.setValue( "UI/LastComposerTemplateDir", saveFileInfo.absolutePath() );

QFile templateFile( saveFileName );
Expand Down

0 comments on commit 6f8f05b

Please sign in to comment.