Skip to content
Permalink
Browse files

field expression widget: silence connect/disconnect noise

  • Loading branch information
jef-n committed Feb 4, 2016
1 parent 004b207 commit bc8a2e4863fbbcb869813831e24e2f5c078d807f
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/gui/qgsfieldexpressionwidget.cpp
@@ -150,7 +150,8 @@ void QgsFieldExpressionWidget::setLayer( QgsMapLayer *layer )

void QgsFieldExpressionWidget::setLayer( QgsVectorLayer *layer )
{
disconnect( mFieldProxyModel->sourceFieldModel()->layer(), SIGNAL( updatedFields() ), this, SLOT( reloadLayer() ) );
if ( mFieldProxyModel->sourceFieldModel()->layer() )
disconnect( mFieldProxyModel->sourceFieldModel()->layer(), SIGNAL( updatedFields() ), this, SLOT( reloadLayer() ) );

mExpressionContext.reset( new QgsExpressionContext() );
mExpressionContext->appendScope( QgsExpressionContextUtils::globalScope() );
@@ -160,7 +161,8 @@ void QgsFieldExpressionWidget::setLayer( QgsVectorLayer *layer )

mFieldProxyModel->sourceFieldModel()->setLayer( layer );

connect( mFieldProxyModel->sourceFieldModel()->layer(), SIGNAL( updatedFields() ), SLOT( reloadLayer() ), Qt::UniqueConnection );
if ( mFieldProxyModel->sourceFieldModel()->layer() )
connect( mFieldProxyModel->sourceFieldModel()->layer(), SIGNAL( updatedFields() ), SLOT( reloadLayer() ), Qt::UniqueConnection );
}

void QgsFieldExpressionWidget::setField( const QString &fieldName )

0 comments on commit bc8a2e4

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