Skip to content
Permalink
Browse files

Also hide non-spatial vector layers from geopdf "include attributes" …

…widget

Since these can't be included in a geopdf!
  • Loading branch information
nyalldawson committed Jun 4, 2020
1 parent 9bf5dca commit 3c758410a349dc8c681ed3ee14720f9075feb744
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/gui/layout/qgsgeopdflayertreemodel.cpp
@@ -195,6 +195,10 @@ bool QgsGeoPdfLayerFilteredTreeModel::filterAcceptsRow( int source_row, const QM
// filter out non-vector layers
if ( QgsLayerTree::isLayer( node ) && QgsLayerTree::toLayer( node ) && QgsLayerTree::toLayer( node )->layer() && QgsLayerTree::toLayer( node )->layer()->type() != QgsMapLayerType::VectorLayer )
return false;

// also filter out non-spatial vector layers
if ( !qobject_cast< QgsVectorLayer * >( QgsLayerTree::toLayer( node )->layer() )->isSpatial() )
return false;
}
return true;
}

0 comments on commit 3c75841

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