Skip to content

Commit

Permalink
Escape should close new ramp creation dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 19, 2020
1 parent 34fb646 commit 9cdcef7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/gui/qgscolorbrewercolorrampdialog.cpp
Expand Up @@ -127,6 +127,7 @@ QgsColorBrewerColorRampDialog::QgsColorBrewerColorRampDialog( const QgsColorBrew
{
QVBoxLayout *vLayout = new QVBoxLayout();
mWidget = new QgsColorBrewerColorRampWidget( ramp );
connect( mWidget, &QgsPanelWidget::panelAccepted, this, &QDialog::reject );
vLayout->addWidget( mWidget );
mButtonBox = new QDialogButtonBox( QDialogButtonBox::Cancel | QDialogButtonBox::Help | QDialogButtonBox::Ok, Qt::Horizontal );
connect( mButtonBox, &QDialogButtonBox::accepted, this, &QDialog::accept );
Expand Down
3 changes: 3 additions & 0 deletions src/gui/qgslimitedrandomcolorrampdialog.cpp
Expand Up @@ -121,6 +121,9 @@ QgsLimitedRandomColorRampDialog::QgsLimitedRandomColorRampDialog( const QgsLimit
{
QVBoxLayout *vLayout = new QVBoxLayout();
mWidget = new QgsLimitedRandomColorRampWidget( ramp );

connect( mWidget, &QgsPanelWidget::panelAccepted, this, &QDialog::reject );

vLayout->addWidget( mWidget );
mButtonBox = new QDialogButtonBox( QDialogButtonBox::Cancel | QDialogButtonBox::Help | QDialogButtonBox::Ok, Qt::Horizontal );
connect( mButtonBox, &QDialogButtonBox::accepted, this, &QDialog::accept );
Expand Down
2 changes: 2 additions & 0 deletions src/gui/qgspresetcolorrampdialog.cpp
Expand Up @@ -111,6 +111,8 @@ QgsPresetColorRampDialog::QgsPresetColorRampDialog( const QgsPresetSchemeColorRa
{
QVBoxLayout *vLayout = new QVBoxLayout();
mWidget = new QgsPresetColorRampWidget( ramp );
connect( mWidget, &QgsPanelWidget::panelAccepted, this, &QDialog::reject );

vLayout->addWidget( mWidget );
mButtonBox = new QDialogButtonBox( QDialogButtonBox::Cancel | QDialogButtonBox::Help | QDialogButtonBox::Ok, Qt::Horizontal );
connect( mButtonBox, &QDialogButtonBox::accepted, this, &QDialog::accept );
Expand Down

0 comments on commit 9cdcef7

Please sign in to comment.