Skip to content

Commit

Permalink
[GUI] OGR Database connection dialog: relax checks to enable 'OK' button
Browse files Browse the repository at this point in the history
Currently when defining a new OGR Database connection, one must fill
the database, host and port numbers. Some/most of them are optional on the
OGR side (for example the MYSQL driver only requires the database name,
but the PG driver could for example work without any depending on the PG
config), so do not require them at all. The 'Test connection' button is
already there for users to check they've properly filled the form.
  • Loading branch information
rouault authored and nyalldawson committed Oct 1, 2020
1 parent 75512b4 commit 9d9d0c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/ogr/qgsnewogrconnection.cpp
Expand Up @@ -123,7 +123,7 @@ void QgsNewOgrConnection::showHelp()

void QgsNewOgrConnection::updateOkButtonState()
{
bool enabled = !txtName->text().isEmpty() && !txtHost->text().isEmpty() && !txtDatabase->text().isEmpty() && !txtPort->text().isEmpty();
bool enabled = !txtName->text().isEmpty();
buttonBox->button( QDialogButtonBox::Ok )->setEnabled( enabled );
}

Expand Down

0 comments on commit 9d9d0c0

Please sign in to comment.