mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Fix #10402 - Don't duplicate combo items on selection
This commit is contained in:
parent
de699325f2
commit
2d267f1553
@ -109,6 +109,10 @@ QModelIndex QgsFieldModel::setExpression( const QString &expression )
|
||||
if ( !mAllowExpression )
|
||||
return QModelIndex();
|
||||
|
||||
QModelIndex idx = indexFromName( expression );
|
||||
if ( idx.isValid() )
|
||||
return idx;
|
||||
|
||||
beginResetModel();
|
||||
mExpression = QList<QString>() << expression;
|
||||
endResetModel();
|
||||
|
Loading…
x
Reference in New Issue
Block a user