Skip to content

Commit

Permalink
[spatialite provider] refresh connections when creating a db and/or l…
Browse files Browse the repository at this point in the history
…ayer
  • Loading branch information
nirvn committed Dec 11, 2017
1 parent bb90dc3 commit 1da0f8e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/qgsnewspatialitelayerdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 1da0f8e

Please sign in to comment.