Skip to content
Permalink
Browse files

Pressing escape should cancel the Change Data Source dialog

  • Loading branch information
github-actions authored and nyalldawson committed Nov 2, 2020
1 parent 146ae27 commit b52c9893e19987bbb246a11dd48728bf7f893dd3
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/gui/qgsdatasourceselectdialog.cpp
@@ -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 );
}

0 comments on commit b52c989

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