browser: fix update after spatialite database creation (fixes #6258)

This commit is contained in:
Juergen E. Fischer 2014-06-22 00:01:31 +02:00
parent 69ce0397a3
commit ef31ccc4eb

View File

@ -320,9 +320,7 @@ void QgsSLRootItem::createDatabase()
QMessageBox::information( 0, tr( "Create SpatiaLite database" ), tr( "The database has been created" ) );
// add connection
QString baseKey = "/SpatiaLite/connections/";
QSettings settings;
settings.setValue( baseKey + "/sqlitepath", filename );
settings.setValue( "/SpatiaLite/connections/" + QFileInfo( filename ).fileName() + "/sqlitepath", filename );
refresh();
}
@ -330,7 +328,6 @@ void QgsSLRootItem::createDatabase()
{
QMessageBox::critical( 0, tr( "Create SpatiaLite database" ), tr( "Failed to create the database:\n" ) + errCause );
}
}
// ---------------------------------------------------------------------------