Update src/gui/settings/qgssettingseditorwidgetwrapperimpl.cpp

Co-authored-by: Matthias Kuhn <matthias@opengis.ch>
This commit is contained in:
Denis Rouzaud 2024-10-07 09:42:14 +02:00
parent 1df584d1c0
commit 050e57a31d

View File

@ -114,12 +114,12 @@ bool QgsSettingsStringComboBoxWrapper::setWidgetValue( const QString &value ) co
void QgsSettingsStringComboBoxWrapper::enableAutomaticUpdatePrivate() void QgsSettingsStringComboBoxWrapper::enableAutomaticUpdatePrivate()
{ {
QObject::connect( this->mEditor, &QComboBox::currentTextChanged, this, [ = ]( const QString & currentText ) QObject::connect( mEditor, &QComboBox::currentTextChanged, this, [ = ]( const QString & currentText )
{ {
QString textValue = currentText; QString textValue = currentText;
if ( mMode == Mode::Data ) if ( mMode == Mode::Data )
textValue = mEditor->currentData().toString(); textValue = mEditor->currentData().toString();
this->mSetting->setValue( textValue, this->mDynamicKeyPartList ); mSetting->setValue( textValue, mDynamicKeyPartList );
} ); } );
} }