mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
added GRASS map names to input combo
git-svn-id: http://svn.osgeo.org/qgis/trunk@5085 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
0812d66b8e
commit
70d182ef32
@ -1882,23 +1882,31 @@ void QgsGrassModuleInput::updateQgisLayers()
|
|||||||
if ( sourceMap != cm ) continue;
|
if ( sourceMap != cm ) continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
mLayerComboBox->insertItem( layer->name() );
|
|
||||||
if ( layer->name() == current ) mLayerComboBox->setCurrentText ( current );
|
|
||||||
|
|
||||||
mMaps.push_back ( map + "@" + mapset );
|
mMaps.push_back ( map + "@" + mapset );
|
||||||
|
|
||||||
|
QString type;
|
||||||
if ( geomType == QGis::WKBPoint ) {
|
if ( geomType == QGis::WKBPoint ) {
|
||||||
mVectorTypes.push_back ( "point" );
|
type = "point";
|
||||||
} else if ( geomType == QGis::WKBLineString ) {
|
} else if ( geomType == QGis::WKBLineString ) {
|
||||||
mVectorTypes.push_back ( "line" );
|
type = "line";
|
||||||
} else if ( geomType == QGis::WKBPolygon ) {
|
} else if ( geomType == QGis::WKBPolygon ) {
|
||||||
mVectorTypes.push_back ( "area" );
|
type = "area";
|
||||||
} else {
|
} 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 );
|
mMapLayers.push_back ( vector );
|
||||||
mVectorLayerNames.push_back ( QString::number(provider->grassLayer()) );
|
mVectorLayerNames.push_back ( grassLayer );
|
||||||
std::vector<QgsField> fields = vector->fields();
|
std::vector<QgsField> fields = vector->fields();
|
||||||
mVectorFields.push_back ( fields );
|
mVectorFields.push_back ( fields );
|
||||||
}
|
}
|
||||||
@ -1934,9 +1942,12 @@ void QgsGrassModuleInput::updateQgisLayers()
|
|||||||
|
|
||||||
if ( mUpdate && mapset != QgsGrass::getDefaultMapset() ) continue;
|
if ( mUpdate && mapset != QgsGrass::getDefaultMapset() ) continue;
|
||||||
|
|
||||||
mLayerComboBox->insertItem( layer->name() );
|
|
||||||
if ( layer->name() == current ) mLayerComboBox->setCurrentText ( current );
|
|
||||||
mMaps.push_back ( map + "@" + mapset );
|
mMaps.push_back ( map + "@" + mapset );
|
||||||
|
|
||||||
|
QString label = layer->name() + " ( " + map + "@" + mapset + " )";
|
||||||
|
|
||||||
|
mLayerComboBox->insertItem( label );
|
||||||
|
if ( label == current ) mLayerComboBox->setCurrentText ( current );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user