Skip to content
Permalink
Browse files

added GRASS map names to input combo

git-svn-id: http://svn.osgeo.org/qgis/trunk@5085 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek
rblazek committed Mar 24, 2006
1 parent 0812d66 commit 70d182ef32a47092d66015ae7127cc2d3773945f
Showing with 21 additions and 10 deletions.
  1. +21 −10 src/plugins/grass/qgsgrassmodule.cpp
@@ -1882,23 +1882,31 @@ void QgsGrassModuleInput::updateQgisLayers()
if ( sourceMap != cm ) continue;
}

mLayerComboBox->insertItem( layer->name() );
if ( layer->name() == current ) mLayerComboBox->setCurrentText ( current );

mMaps.push_back ( map + "@" + mapset );

QString type;
if ( geomType == QGis::WKBPoint ) {
mVectorTypes.push_back ( "point" );
type = "point";
} else if ( geomType == QGis::WKBLineString ) {
mVectorTypes.push_back ( "line" );
type = "line";
} else if ( geomType == QGis::WKBPolygon ) {
mVectorTypes.push_back ( "area" );
type = "area";
} else {
mVectorTypes.push_back ( "unknown" );
type = "unknown";
}

mVectorTypes.push_back ( type );

QString grassLayer = QString::number(provider->grassLayer());

QString label = layer->name() + " ( " + map + "@" + mapset
+ " " + grassLayer + " " + type + " )";

mLayerComboBox->insertItem( label );
if ( label == current ) mLayerComboBox->setCurrentText ( current );

mMapLayers.push_back ( vector );
mVectorLayerNames.push_back ( QString::number(provider->grassLayer()) );
mVectorLayerNames.push_back ( grassLayer );
std::vector<QgsField> fields = vector->fields();
mVectorFields.push_back ( fields );
}
@@ -1934,9 +1942,12 @@ void QgsGrassModuleInput::updateQgisLayers()

if ( mUpdate && mapset != QgsGrass::getDefaultMapset() ) continue;

mLayerComboBox->insertItem( layer->name() );
if ( layer->name() == current ) mLayerComboBox->setCurrentText ( current );
mMaps.push_back ( map + "@" + mapset );

QString label = layer->name() + " ( " + map + "@" + mapset + " )";

mLayerComboBox->insertItem( label );
if ( label == current ) mLayerComboBox->setCurrentText ( current );
}
}
}

0 comments on commit 70d182e

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