mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Disable "merge lines" option with "line direction symbol"
This sometimes produces inversed lines and therefore unreliable results.
This commit is contained in:
parent
4a800a13c2
commit
2ffc041fa9
@ -853,6 +853,16 @@ void QgsLabelingGui::updateUi()
|
||||
syncDefinedCheckboxFrame( mFormatNumDDBtn, mFormatNumChkBx, mFormatNumFrame );
|
||||
syncDefinedCheckboxFrame( mScaleBasedVisibilityDDBtn, mScaleBasedVisibilityChkBx, mScaleBasedVisibilityFrame );
|
||||
syncDefinedCheckboxFrame( mFontLimitPixelDDBtn, mFontLimitPixelChkBox, mFontLimitPixelFrame );
|
||||
|
||||
chkMergeLines->setEnabled( !mDirectSymbChkBx->isChecked() );
|
||||
if ( mDirectSymbChkBx->isChecked() )
|
||||
{
|
||||
chkMergeLines->setToolTip( tr( "This option is not compatible with line direction symbols." ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
chkMergeLines->setToolTip( QString() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -351,7 +351,7 @@ QgsPalLayerSettings& QgsPalLayerSettings::operator=( const QgsPalLayerSettings &
|
||||
upsidedownLabels = s.upsidedownLabels;
|
||||
|
||||
labelPerPart = s.labelPerPart;
|
||||
mergeLines = s.mergeLines;
|
||||
mergeLines = s.mergeLines && !s.addDirectionSymbol;
|
||||
minFeatureSize = s.minFeatureSize;
|
||||
limitNumLabels = s.limitNumLabels;
|
||||
maxNumLabels = s.maxNumLabels;
|
||||
|
@ -83,11 +83,17 @@ void QgsVectorLayerLabelProvider::init()
|
||||
mPlacement = mSettings.placement;
|
||||
mLinePlacementFlags = mSettings.placementFlags;
|
||||
mFlags = Flags();
|
||||
if ( mSettings.drawLabels ) mFlags |= DrawLabels;
|
||||
if ( mSettings.displayAll ) mFlags |= DrawAllLabels;
|
||||
if ( mSettings.mergeLines ) mFlags |= MergeConnectedLines;
|
||||
if ( mSettings.centroidInside ) mFlags |= CentroidMustBeInside;
|
||||
if ( mSettings.labelPerPart ) mFlags |= LabelPerFeaturePart;
|
||||
if ( mSettings.drawLabels )
|
||||
mFlags |= DrawLabels;
|
||||
if ( mSettings.displayAll )
|
||||
mFlags |= DrawAllLabels;
|
||||
if ( mSettings.mergeLines && !mSettings.addDirectionSymbol )
|
||||
mFlags |= MergeConnectedLines;
|
||||
if ( mSettings.centroidInside )
|
||||
mFlags |= CentroidMustBeInside;
|
||||
if ( mSettings.labelPerPart )
|
||||
mFlags |= LabelPerFeaturePart;
|
||||
|
||||
mPriority = 1 - mSettings.priority / 10.0; // convert 0..10 --> 1..0
|
||||
|
||||
if ( mLayerGeometryType == QgsWkbTypes::PointGeometry && mRenderer )
|
||||
|
Loading…
x
Reference in New Issue
Block a user