Skip to content

Commit

Permalink
Fix button box in options dialog not working (fix #11960)
Browse files Browse the repository at this point in the history
QgsOptionsDialogBase was incorrectly finding the projection
selector's buttonBox widget and attaching the connections
to that widget, rather than the dialog's widget.

Rename projection selector's button box to avoid this conflict.
  • Loading branch information
nyalldawson committed Jan 7, 2015
1 parent 7057af3 commit c11319b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/gui/qgsgenericprojectionselector.sip
Expand Up @@ -31,7 +31,7 @@ class QgsGenericProjectionSelector : QDialog //, private Ui::QgsGenericProjectio
void setSelectedCrsId( long theID );
void setSelectedAuthId( QString authId );

void on_buttonBox_helpRequested();
void on_mButtonBox_helpRequested();

/**
* \brief filters this dialog by the given CRSs
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsgenericprojectionselector.h
Expand Up @@ -69,7 +69,7 @@ class GUI_EXPORT QgsGenericProjectionSelector : public QDialog, private Ui::QgsG
void setSelectedCrsId( long theID );
void setSelectedAuthId( QString authId );

void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
void on_mButtonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }

/**
* \brief filters this dialog by the given CRSs
Expand Down
6 changes: 3 additions & 3 deletions src/ui/qgsgenericprojectionselectorbase.ui
Expand Up @@ -57,7 +57,7 @@
<widget class="QgsProjectionSelector" name="projectionSelector" native="true"/>
</item>
<item row="2" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<widget class="QDialogButtonBox" name="mButtonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
</property>
Expand All @@ -80,7 +80,7 @@
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<sender>mButtonBox</sender>
<signal>accepted()</signal>
<receiver>QgsGenericProjectionSelectorBase</receiver>
<slot>accept()</slot>
Expand All @@ -96,7 +96,7 @@
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<sender>mButtonBox</sender>
<signal>rejected()</signal>
<receiver>QgsGenericProjectionSelectorBase</receiver>
<slot>reject()</slot>
Expand Down

0 comments on commit c11319b

Please sign in to comment.