Skip to content

Commit

Permalink
Merge pull request #36129 from jgrocha/postgis-dialogue-ux-improvement
Browse files Browse the repository at this point in the history
Enables Postgresql service based connections without database name
  • Loading branch information
alexbruy committed May 4, 2020
2 parents ac8b956 + c90ce4e commit 8aa32f7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspgnewconnection.cpp
Expand Up @@ -249,7 +249,7 @@ void QgsPgNewConnection::showHelp()
void QgsPgNewConnection::updateOkButtonState()
{
bool enabled = !txtName->text().isEmpty() && (
( !txtService->text().isEmpty() && !txtDatabase->text().isEmpty() ) ||
!txtService->text().isEmpty() ||
( !txtHost->text().isEmpty() && !txtPort->text().isEmpty() && !txtDatabase->text().isEmpty() ) );
buttonBox->button( QDialogButtonBox::Ok )->setEnabled( enabled );
}
1 change: 1 addition & 0 deletions src/providers/postgres/qgspgsourceselect.cpp
Expand Up @@ -345,6 +345,7 @@ void QgsPgSourceSelect::btnLoad_clicked()
void QgsPgSourceSelect::btnEdit_clicked()
{
QgsPgNewConnection *nc = new QgsPgNewConnection( this, cmbConnections->currentText() );
nc->setWindowTitle( tr( "Edit PostGIS Connection" ) );
if ( nc->exec() )
{
populateConnectionList();
Expand Down
1 change: 1 addition & 0 deletions src/providers/postgres/qgspostgresdataitemguiprovider.cpp
Expand Up @@ -185,6 +185,7 @@ void QgsPostgresDataItemGuiProvider::newConnection( QgsDataItem *item )
void QgsPostgresDataItemGuiProvider::editConnection( QgsDataItem *item )
{
QgsPgNewConnection nc( nullptr, item->name() );
nc.setWindowTitle( tr( "Edit PostGIS Connection" ) );
if ( nc.exec() )
{
// the parent should be updated
Expand Down

0 comments on commit 8aa32f7

Please sign in to comment.