Skip to content
Permalink
Browse files

[spatialite provider] refresh connections when creating a db and/or l…

…ayer
  • Loading branch information
nirvn committed Dec 11, 2017
1 parent bb90dc3 commit 1da0f8e54395c270362e817e10320803818b6f11
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/app/qgsnewspatialitelayerdialog.cpp
@@ -338,7 +338,8 @@ bool QgsNewSpatialiteLayerDialog::createDb()
settings.setValue( QStringLiteral( "SpatiaLite/connections/selected" ), fi.fileName() + tr( "@" ) + fi.canonicalFilePath() );
settings.setValue( key, fi.canonicalFilePath() );

QMessageBox::information( nullptr, tr( "SpatiaLite Database" ), tr( "Registered new database!" ) );
// Reload connections to refresh browser panel
QgisApp::instance()->reloadConnections();
}

pbnFindSRID->setEnabled( true );
@@ -445,6 +446,9 @@ bool QgsNewSpatialiteLayerDialog::apply()
leGeometryColumn->text() ), leLayerName->text(), QStringLiteral( "spatialite" ) );
if ( layer->isValid() )
{
// Reload connections to refresh browser panel
QgisApp::instance()->reloadConnections();

// register this layer with the central layers registry
QList<QgsMapLayer *> myList;
myList << layer;

0 comments on commit 1da0f8e

Please sign in to comment.
You can’t perform that action at this time.