@@ -59,7 +59,9 @@ QgsAttributeTableDisplay::QgsAttributeTableDisplay(QgsVectorLayer* layer, QgisAp
5959 connect (mSearchButton , SIGNAL (clicked ()), this , SLOT (search ()));
6060 connect (mSearchShowResults , SIGNAL (activated (int )), this , SLOT (searchShowResultsChanged (int )));
6161 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 ()));
6365 connect (tblAttributes, SIGNAL (featureAttributeChanged (int ,int )), this , SLOT (changeFeatureAttribute (int ,int )));
6466
6567 // disable those buttons until start editing has been pressed and provider supports it
@@ -175,7 +177,7 @@ void QgsAttributeTableDisplay::startEditing()
175177 {
176178 btnStartEditing->setEnabled (false );
177179 btnStopEditing->setEnabled (true );
178- btnClose ->setEnabled (false );
180+ buttonBox-> button (QDialogButtonBox::Close) ->setEnabled (false );
179181 // make the dialog modal when in editable
180182 // otherwise map editing and table editing
181183 // may disturb each other
@@ -213,7 +215,7 @@ void QgsAttributeTableDisplay::stopEditing()
213215 }
214216 btnStartEditing->setEnabled (true );
215217 btnStopEditing->setEnabled (false );
216- btnClose ->setEnabled (true );
218+ buttonBox-> button (QDialogButtonBox::Close) ->setEnabled (true );
217219 mAddAttributeButton ->setEnabled (false );
218220 mDeleteAttributeButton ->setEnabled (false );
219221 table ()->setReadOnly (true );
@@ -400,10 +402,6 @@ void QgsAttributeTableDisplay::saveWindowLocation()
400402 settings.setValue (" /Windows/AttributeTable/geometry" , saveGeometry ());
401403}
402404
403- void QgsAttributeTableDisplay::on_btnHelp_clicked ()
404- {
405- showHelp ();
406- }
407405void QgsAttributeTableDisplay::showHelp ()
408406{
409407 QgsContextHelp::run (context_id);
0 commit comments