Skip to content

Commit 5751cad

Browse files
committed
field combobox: properly emit signal when setField on the first displayed field
1 parent 09a9a61 commit 5751cad

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎src/gui/qgsfieldcombobox.cpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ QgsFieldComboBox::QgsFieldComboBox( QWidget *parent ) :
2424
mFieldProxyModel = new QgsFieldProxyModel( this );
2525
setModel( mFieldProxyModel );
2626

27-
connect( this, SIGNAL( currentIndexChanged( int ) ), this, SLOT( indexChanged( int ) ) );
27+
connect( this, SIGNAL( activated( int ) ), this, SLOT( indexChanged( int ) ) );
2828
}
2929

3030
void QgsFieldComboBox::setFilters( QgsFieldProxyModel::Filters filters )
@@ -60,6 +60,7 @@ void QgsFieldComboBox::setField( QString fieldName )
6060
if ( proxyIdx.isValid() )
6161
{
6262
setCurrentIndex( idx.row() );
63+
emit fieldChanged( currentField() );
6364
return;
6465
}
6566
}

0 commit comments

Comments
 (0)