Skip to content
Permalink
Browse files

Fix initial placement selection is empty

  • Loading branch information
nyalldawson committed Aug 20, 2020
1 parent f62c6d5 commit a462a17ae5033435c0231fc69b05cd20d8289b02
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/gui/labeling/qgslabelinggui.cpp
@@ -353,7 +353,16 @@ void QgsLabelingGui::setLayer( QgsMapLayer *mapLayer )

mCheckAllowLabelsOutsidePolygons->setChecked( mSettings.polygonPlacementFlags() & QgsLabeling::PolygonPlacementFlag::AllowPlacementOutsideOfPolygon );

mPlacementModeComboBox->setCurrentIndex( mPlacementModeComboBox->findData( mSettings.placement ) );
const int placementIndex = mPlacementModeComboBox->findData( mSettings.placement );
if ( placementIndex >= 0 )
{
mPlacementModeComboBox->setCurrentIndex( placementIndex );
}
else
{
// use default placement for layer type
mPlacementModeComboBox->setCurrentIndex( 0 );
}

// Label repeat distance
mRepeatDistanceSpinBox->setValue( mSettings.repeatDistance );

0 comments on commit a462a17

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