Skip to content
Permalink
Browse files
[layertree] Do not show check box for nonspatial tables
  • Loading branch information
wonder-sk committed May 22, 2014
1 parent 6f5c775 commit fab44c70bd57cda24061be764e9e628001e98653
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/gui/layertree/qgslayertreemodel.cpp
@@ -222,6 +222,11 @@ QVariant QgsLayerTreeModel::data( const QModelIndex &index, int role ) const
if ( QgsLayerTree::isLayer( node ) )
{
QgsLayerTreeLayer* nodeLayer = QgsLayerTree::toLayer( node );
if ( nodeLayer->layer() && nodeLayer->layer()->type() == QgsMapLayer::VectorLayer )
{
if ( qobject_cast<QgsVectorLayer*>( nodeLayer->layer() )->geometryType() == QGis::NoGeometry )
return QVariant(); // do not show checkbox for non-spatial tables
}
return nodeLayer->isVisible();
}
else if ( QgsLayerTree::isGroup( node ) )

0 comments on commit fab44c7

Please sign in to comment.