Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[BACKPORT] add extension to new SpatiaLite database if user ommits it
  • Loading branch information
alexbruy committed Dec 23, 2011
1 parent 6dae2f1 commit 9d3b756
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/spatialite/qgsnewspatialitelayerdialog.cpp
Expand Up @@ -109,6 +109,11 @@ void QgsNewSpatialiteLayerDialog::on_toolButtonNewDatabase_clicked()
if ( fileName.isEmpty() )
return;

if ( !fileName.toLower().endsWith( ".sqlite" ) && !fileName.toLower().endsWith( ".db" ) )
{
fileName += ".sqlite";
}

mDatabaseComboBox->insertItem( 0, fileName );
mDatabaseComboBox->setCurrentIndex( 0 );
createDb();
Expand Down

0 comments on commit 9d3b756

Please sign in to comment.