Skip to content
Permalink
Browse files

Avoid duplicate changed signals thrown by QgsAuthConfigSelect

  • Loading branch information
nyalldawson committed Dec 13, 2018
1 parent 11ea28a commit 56bd682d96675207d07a2b2c4f355fd52f8ef00c
Showing with 7 additions and 1 deletion.
  1. +6 −1 src/gui/auth/qgsauthconfigselect.cpp
  2. +1 −0 src/gui/auth/qgsauthconfigselect.h
@@ -83,7 +83,11 @@ void QgsAuthConfigSelect::setConfigId( const QString &authcfg )
{
mAuthCfg = authcfg;
}
// avoid duplicate call to loadConfig(), which may potentially be triggered by combo box index changes in the
// call to populateConfigSelector(). We *always* call loadConfig() after this, so we don't want to do it twice.
mTemporarilyBlockLoad = true;
populateConfigSelector();
mTemporarilyBlockLoad = false;
loadConfig();
}
}
@@ -197,7 +201,8 @@ void QgsAuthConfigSelect::cmbConfigSelect_currentIndexChanged( int index )
{
QString authcfg = cmbConfigSelect->itemData( index ).toString();
mAuthCfg = ( !authcfg.isEmpty() && authcfg != QLatin1String( "0" ) ) ? authcfg : QString();
loadConfig();
if ( !mTemporarilyBlockLoad )
loadConfig();
}

void QgsAuthConfigSelect::btnConfigAdd_clicked()
@@ -93,6 +93,7 @@ class GUI_EXPORT QgsAuthConfigSelect : public QWidget, private Ui::QgsAuthConfig
bool mDisabled = false;
QVBoxLayout *mAuthNotifyLayout = nullptr;
QLabel *mAuthNotify = nullptr;
bool mTemporarilyBlockLoad = false;
};


0 comments on commit 56bd682

Please sign in to comment.
You can’t perform that action at this time.