Skip to content

Commit a4cf840

Browse files
committed
Add Cancel button to "Size Legend" dialog
because it's easier than hitting the cross button if you want to leave the dialog
1 parent 9956864 commit a4cf840

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/app/qgsdiagramproperties.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1039,9 +1039,10 @@ void QgsDiagramProperties::showSizeLegendDialog()
10391039
dlg.setLayout( new QVBoxLayout() );
10401040
dlg.setWindowTitle( panel->panelTitle() );
10411041
dlg.layout()->addWidget( panel );
1042-
QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Help | QDialogButtonBox::Ok );
1042+
QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Cancel | QDialogButtonBox::Help | QDialogButtonBox::Ok );
10431043
connect( buttonBox, &QDialogButtonBox::accepted, &dlg, &QDialog::accept );
10441044
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsDiagramProperties::showHelp );
1045+
connect( buttonBox, &QDialogButtonBox::rejected, &dlg, &QDialog::reject );
10451046
dlg.layout()->addWidget( buttonBox );
10461047
if ( dlg.exec() )
10471048
mSizeLegend.reset( panel->dataDefinedSizeLegend() );

0 commit comments

Comments
 (0)