Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 committed Mar 24, 2006
1 parent 0812d66 commit 70d182e
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions src/plugins/grass/qgsgrassmodule.cpp
Expand Up @@ -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 );
}
Expand Down Expand Up @@ -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 );
}
}
}
Expand Down

0 comments on commit 70d182e

Please sign in to comment.