Skip to content
Permalink
Browse files
field combobox: properly emit signal when setField on the first displ…
…ayed field
  • Loading branch information
3nids committed May 12, 2014
1 parent 09a9a61 commit 5751cadaf3b4d1dae02ecc3be0fb1c4b1d5e7894
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/gui/qgsfieldcombobox.cpp
@@ -24,7 +24,7 @@ QgsFieldComboBox::QgsFieldComboBox( QWidget *parent ) :
mFieldProxyModel = new QgsFieldProxyModel( this );
setModel( mFieldProxyModel );

connect( this, SIGNAL( currentIndexChanged( int ) ), this, SLOT( indexChanged( int ) ) );
connect( this, SIGNAL( activated( int ) ), this, SLOT( indexChanged( int ) ) );
}

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

0 comments on commit 5751cad

Please sign in to comment.