Skip to content
Permalink
Browse files

Pressing escape should cancel the Change Data Source dialog

  • Loading branch information
nyalldawson committed Nov 2, 2020
1 parent 9935bbe commit 45f12cbb1ed7b9b4564ff61a64a946a810abcd53
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 45f12cb

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