Skip to content
Permalink
Browse files

map layer combo: emit signal on setLayer even if index is not changed

  • Loading branch information
3nids committed May 6, 2014
1 parent 41ccfb9 commit ac2c74264a04ba4d5b880e1d397f7cadfaa04947
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/gui/qgsmaplayercombobox.cpp
@@ -22,7 +22,7 @@ QgsMapLayerComboBox::QgsMapLayerComboBox( QWidget *parent ) :
mProxyModel = new QgsMapLayerProxyModel( this );
setModel( mProxyModel );

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

void QgsMapLayerComboBox::setFilters( QgsMapLayerProxyModel::Filters filters )
@@ -43,6 +43,8 @@ void QgsMapLayerComboBox::setLayer( QgsMapLayer *layer )
}
}
setCurrentIndex( -1 );

emit layerChanged( currentLayer() );
}

QgsMapLayer* QgsMapLayerComboBox::currentLayer()
@@ -75,5 +77,3 @@ void QgsMapLayerComboBox::indexChanged( int i )
QgsMapLayer* layer = currentLayer();
emit layerChanged( layer );
}


0 comments on commit ac2c742

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