Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 3, 2024
1 parent 6046a7c commit 0892ebf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/qgsabstractgeopdfexporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,10 @@ QString QgsAbstractGeoPdfExporter::createCompositionXml( const QList<ComponentLa
// some PDF components may not be linked to vector components - e.g. layers with labels but no features (or raster layers)
for ( const ComponentLayerDetail &component : components )
{
if ( component.mapLayerId.isEmpty() || createdLayerIds.value( component.group ).contains( component.mapLayerId ) )
if ( ( component.mapLayerId.isEmpty() && component.group.isEmpty() ) || createdLayerIds.value( component.group ).contains( component.mapLayerId ) )
continue;

if ( details.customLayerTreeGroups.contains( component.mapLayerId ) )
if ( !component.mapLayerId.isEmpty() && details.customLayerTreeGroups.contains( component.mapLayerId ) )
continue;

QDomElement layer = doc.createElement( QStringLiteral( "Layer" ) );
Expand Down Expand Up @@ -553,7 +553,7 @@ QString QgsAbstractGeoPdfExporter::createCompositionXml( const QList<ComponentLa
QDomElement content = doc.createElement( QStringLiteral( "Content" ) );
for ( const ComponentLayerDetail &component : components )
{
if ( component.mapLayerId.isEmpty() )
if ( component.mapLayerId.isEmpty() && component.group.isEmpty() )
{
content.appendChild( createPdfDatasetElement( component ) );
}
Expand Down

0 comments on commit 0892ebf

Please sign in to comment.