File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -130,11 +130,8 @@ void QgsFieldExpressionWidget::setField( const QString fieldName )
130130 // new expression
131131 idx = mFieldProxyModel ->sourceFieldModel ()->setExpression ( fieldName );
132132 }
133-
134133 QModelIndex proxyIndex = mFieldProxyModel ->mapFromSource ( idx );
135-
136134 mCombo ->setCurrentIndex ( proxyIndex.row () );
137-
138135 currentFieldChanged ();
139136}
140137
@@ -169,7 +166,8 @@ void QgsFieldExpressionWidget::expressionEditingFinished()
169166{
170167 const QString expression = mCombo ->lineEdit ()->text ();
171168 QModelIndex idx = mFieldProxyModel ->sourceFieldModel ()->setExpression ( expression );
172- mCombo ->setCurrentIndex ( idx.row () );
169+ QModelIndex proxyIndex = mFieldProxyModel ->mapFromSource ( idx );
170+ mCombo ->setCurrentIndex ( proxyIndex.row () );
173171 currentFieldChanged ();
174172}
175173
You can’t perform that action at this time.
0 commit comments