Skip to content
Permalink
Browse files

[style dock] fix wrong label settings when switching layers

(fixes #17029)
  • Loading branch information
nirvn committed Oct 2, 2017
1 parent 5bdb605 commit 471204dd4de2225979a1846209bfcb39700aeeba
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/app/qgslabelingwidget.cpp
@@ -36,8 +36,6 @@ QgsLabelingWidget::QgsLabelingWidget( QgsVectorLayer *layer, QgsMapCanvas *canva

connect( mEngineSettingsButton, &QAbstractButton::clicked, this, &QgsLabelingWidget::showEngineConfigDialog );

mLabelModeComboBox->setCurrentIndex( -1 );

connect( mLabelModeComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsLabelingWidget::labelModeChanged );
setLayer( layer );
}
@@ -81,6 +79,8 @@ void QgsLabelingWidget::adaptToLayer()
if ( !mLayer )
return;

whileBlocking( mLabelModeComboBox )->setCurrentIndex( -1 );

// pick the right mode of the layer
if ( mLayer->labeling() && mLayer->labeling()->type() == QLatin1String( "rule-based" ) )
{

0 comments on commit 471204d

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