Skip to content
Permalink
Browse files

Merge pull request #36129 from jgrocha/postgis-dialogue-ux-improvement

Enables Postgresql service based connections without database name
  • Loading branch information
alexbruy committed May 4, 2020
2 parents ac8b956 + c90ce4e commit 8aa32f71c5e7f710b907f3c73bece914f6950b46
@@ -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 );
}
@@ -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();
@@ -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

0 comments on commit 8aa32f7

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