Skip to content
Permalink
Browse files

GRASS: show layers non expandable

  • Loading branch information
blazek committed Nov 6, 2014
1 parent 7c52e7d commit 443264f2a729d02fe7988e7c34ee67b5c3be9039
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/providers/grass/qgsgrassprovidermodule.cpp
@@ -112,7 +112,9 @@ QVector<QgsDataItem*> QgsGrassMapsetItem::createChildren()

if ( layerNames.size() == 1 )
{
/* This may happen (one layer only) in GRASS 7 with points (no topo layers) */
QgsLayerItem *layer = new QgsLayerItem( this, name + " " + baseLayerName, path, uri, layerType, "grass" );
layer->populate(); // does nothing, but sets mPopulated to true to show non expandable in browser
items.append( layer );
}
else
@@ -133,6 +135,7 @@ QVector<QgsDataItem*> QgsGrassMapsetItem::createChildren()
QgsDebugMsg( "uri = " + uri );

QgsLayerItem *layer = new QgsLayerItem( this, name, uri, uri, QgsLayerItem::Raster, "grassraster" );
layer->populate(); // does nothing, but sets mPopulated to true to show non expandable in browser

items.append( layer );
}
@@ -144,6 +147,7 @@ QgsGrassVectorLayerItem::QgsGrassVectorLayerItem( QgsDataItem* parent, QString m
: QgsLayerItem( parent, layerName, path, uri, layerType, providerKey )
, mMapName( mapName )
{
mPopulated = true; // no children, to show non expandable in browser
}

QString QgsGrassVectorLayerItem::layerName() const

0 comments on commit 443264f

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