Skip to content

Commit 3e0b744

Browse files
authored
Merge pull request #59926 from nyalldawson/thin_xml
Don't write unnecessary attribute to XML when saving point cloud layers
2 parents e6134fd + ebfa41c commit 3e0b744

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/pointcloud/qgspointcloudrenderer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ void QgsPointCloudRenderer::saveCommonProperties( QDomElement &element, const Qg
260260
element.setAttribute( QStringLiteral( "horizontalTriangleFilterThreshold" ), qgsDoubleToString( mHorizontalTriangleFilterThreshold ) );
261261
element.setAttribute( QStringLiteral( "horizontalTriangleFilterUnit" ), QgsUnitTypes::encodeUnit( mHorizontalTriangleFilterUnit ) );
262262

263-
element.setAttribute( QStringLiteral( "showLabels" ), QString::number( mShowLabels ) );
263+
if ( mShowLabels )
264+
element.setAttribute( QStringLiteral( "showLabels" ), QStringLiteral( "1" ) );
264265
if ( mLabelTextFormat.isValid() )
265266
{
266267
QDomDocument doc = element.ownerDocument();

0 commit comments

Comments
 (0)