Checks for .mpt extension, before adding extension when saving project templates

This commit is contained in:
Dave French
2015-01-29 10:38:19 +00:00
parent 56635c1fcf
commit efa75b0151

View File

@@ -831,7 +831,7 @@ bool MainWindow::saveProjectAs()
!sfd.selectedFiles().isEmpty() && sfd.selectedFiles()[0] != "" )
{
QString fname = sfd.selectedFiles()[0] ;
if( sfd.selectedNameFilter().contains( "(*.mpt)" ) )
if( sfd.selectedNameFilter().contains( "(*.mpt)" ) && !sfd.selectedFiles()[0].endsWith( ".mpt" ) )
{
fname += ".mpt";
}