Skip to content
Permalink
Browse files
Don't lose layer unplaced label visibility setting when altering
label properties in GUI
  • Loading branch information
nyalldawson committed Jun 7, 2021
1 parent 8e73e39 commit a6906097c0bb68c6bab80011424762f93bb982e2
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/gui/labeling/qgslabelinggui.cpp
@@ -497,6 +497,9 @@ QgsPalLayerSettings QgsLabelingGui::layerSettings()
{
QgsPalLayerSettings lyr;

// restore properties which aren't exposed in GUI
lyr.setUnplacedVisibility( mSettings.unplacedVisibility() );

lyr.drawLabels = ( mMode == Labels ) || !mLayer;

bool isExpression;
@@ -519,7 +522,7 @@ QgsPalLayerSettings QgsLabelingGui::layerSettings()
lyr.offsetType = static_cast< QgsPalLayerSettings::OffsetType >( mOffsetTypeComboBox->currentData().toInt() );
if ( mQuadrantBtnGrp )
{
lyr.quadOffset = ( QgsPalLayerSettings::QuadrantPosition )mQuadrantBtnGrp->checkedId();
lyr.quadOffset = static_cast< QgsPalLayerSettings::QuadrantPosition >( mQuadrantBtnGrp->checkedId() );
}
lyr.xOffset = mPointOffsetXSpinBox->value();
lyr.yOffset = mPointOffsetYSpinBox->value();
@@ -585,7 +588,7 @@ QgsPalLayerSettings QgsLabelingGui::layerSettings()
}
if ( mUpsidedownBtnGrp )
{
lyr.upsidedownLabels = ( QgsPalLayerSettings::UpsideDownLabels )mUpsidedownBtnGrp->checkedId();
lyr.upsidedownLabels = static_cast< QgsPalLayerSettings::UpsideDownLabels >( mUpsidedownBtnGrp->checkedId() );
}

lyr.maxCurvedCharAngleIn = mMaxCharAngleInDSpinBox->value();

0 comments on commit a690609

Please sign in to comment.