Skip to content

Commit

Permalink
Pressing escape should cancel the Change Data Source dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 2, 2020
1 parent 9935bbe commit 45f12cb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gui/qgsdatasourceselectdialog.cpp
Expand Up @@ -325,6 +325,10 @@ QgsDataSourceSelectDialog::QgsDataSourceSelectDialog( QgsBrowserGuiModel *browse
buttonBox->button( QDialogButtonBox::Ok )->setEnabled( false );
connect( mWidget, &QgsDataSourceSelectWidget::validationChanged, buttonBox->button( QDialogButtonBox::Ok ), &QWidget::setEnabled );
connect( mWidget, &QgsDataSourceSelectWidget::itemTriggered, this, &QDialog::accept );

// pressing escape should reject the dialog
connect( mWidget, &QgsPanelWidget::panelAccepted, this, &QDialog::reject );

vl->addWidget( buttonBox );
setLayout( vl );
}
Expand Down

0 comments on commit 45f12cb

Please sign in to comment.