map layer combo: emit signal before return

This commit is contained in:
Denis Rouzaud 2014-05-06 16:04:30 +02:00
parent ac2c74264a
commit 16073969a9

View File

@ -16,6 +16,7 @@
#include "qgsmaplayercombobox.h"
#include "qgsmaplayermodel.h"
QgsMapLayerComboBox::QgsMapLayerComboBox( QWidget *parent ) :
QComboBox( parent )
{
@ -39,11 +40,11 @@ void QgsMapLayerComboBox::setLayer( QgsMapLayer *layer )
if ( proxyIdx.isValid() )
{
setCurrentIndex( proxyIdx.row() );
emit layerChanged( currentLayer() );
return;
}
}
setCurrentIndex( -1 );
emit layerChanged( currentLayer() );
}