@@ -59,7 +59,9 @@ QgsAttributeTableDisplay::QgsAttributeTableDisplay(QgsVectorLayer* layer, QgisAp
59
59
connect (mSearchButton , SIGNAL (clicked ()), this , SLOT (search ()));
60
60
connect (mSearchShowResults , SIGNAL (activated (int )), this , SLOT (searchShowResultsChanged (int )));
61
61
connect (btnAdvancedSearch, SIGNAL (clicked ()), this , SLOT (advancedSearch ()));
62
- connect (btnClose, SIGNAL (clicked ()), this , SLOT (close ()));
62
+ connect (buttonBox, SIGNAL (helpRequested ()), this , SLOT (showHelp ()));
63
+ connect (buttonBox->button (QDialogButtonBox::Close), SIGNAL (clicked ()),
64
+ this , SLOT (close ()));
63
65
connect (tblAttributes, SIGNAL (featureAttributeChanged (int ,int )), this , SLOT (changeFeatureAttribute (int ,int )));
64
66
65
67
// disable those buttons until start editing has been pressed and provider supports it
@@ -175,7 +177,7 @@ void QgsAttributeTableDisplay::startEditing()
175
177
{
176
178
btnStartEditing->setEnabled (false );
177
179
btnStopEditing->setEnabled (true );
178
- btnClose ->setEnabled (false );
180
+ buttonBox-> button (QDialogButtonBox::Close) ->setEnabled (false );
179
181
// make the dialog modal when in editable
180
182
// otherwise map editing and table editing
181
183
// may disturb each other
@@ -213,7 +215,7 @@ void QgsAttributeTableDisplay::stopEditing()
213
215
}
214
216
btnStartEditing->setEnabled (true );
215
217
btnStopEditing->setEnabled (false );
216
- btnClose ->setEnabled (true );
218
+ buttonBox-> button (QDialogButtonBox::Close) ->setEnabled (true );
217
219
mAddAttributeButton ->setEnabled (false );
218
220
mDeleteAttributeButton ->setEnabled (false );
219
221
table ()->setReadOnly (true );
@@ -400,10 +402,6 @@ void QgsAttributeTableDisplay::saveWindowLocation()
400
402
settings.setValue (" /Windows/AttributeTable/geometry" , saveGeometry ());
401
403
}
402
404
403
- void QgsAttributeTableDisplay::on_btnHelp_clicked ()
404
- {
405
- showHelp ();
406
- }
407
405
void QgsAttributeTableDisplay::showHelp ()
408
406
{
409
407
QgsContextHelp::run (context_id);
0 commit comments