Skip to content

Commit 845d573

Browse files
author
rblazek
committed
added GRASS map names to input combo
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5085 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent ba77a12 commit 845d573

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

src/plugins/grass/qgsgrassmodule.cpp

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1882,23 +1882,31 @@ void QgsGrassModuleInput::updateQgisLayers()
18821882
if ( sourceMap != cm ) continue;
18831883
}
18841884

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

1887+
QString type;
18901888
if ( geomType == QGis::WKBPoint ) {
1891-
mVectorTypes.push_back ( "point" );
1889+
type = "point";
18921890
} else if ( geomType == QGis::WKBLineString ) {
1893-
mVectorTypes.push_back ( "line" );
1891+
type = "line";
18941892
} else if ( geomType == QGis::WKBPolygon ) {
1895-
mVectorTypes.push_back ( "area" );
1893+
type = "area";
18961894
} else {
1897-
mVectorTypes.push_back ( "unknown" );
1895+
type = "unknown";
18981896
}
18991897

1898+
mVectorTypes.push_back ( type );
1899+
1900+
QString grassLayer = QString::number(provider->grassLayer());
1901+
1902+
QString label = layer->name() + " ( " + map + "@" + mapset
1903+
+ " " + grassLayer + " " + type + " )";
1904+
1905+
mLayerComboBox->insertItem( label );
1906+
if ( label == current ) mLayerComboBox->setCurrentText ( current );
1907+
19001908
mMapLayers.push_back ( vector );
1901-
mVectorLayerNames.push_back ( QString::number(provider->grassLayer()) );
1909+
mVectorLayerNames.push_back ( grassLayer );
19021910
std::vector<QgsField> fields = vector->fields();
19031911
mVectorFields.push_back ( fields );
19041912
}
@@ -1934,9 +1942,12 @@ void QgsGrassModuleInput::updateQgisLayers()
19341942

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

1937-
mLayerComboBox->insertItem( layer->name() );
1938-
if ( layer->name() == current ) mLayerComboBox->setCurrentText ( current );
19391945
mMaps.push_back ( map + "@" + mapset );
1946+
1947+
QString label = layer->name() + " ( " + map + "@" + mapset + " )";
1948+
1949+
mLayerComboBox->insertItem( label );
1950+
if ( label == current ) mLayerComboBox->setCurrentText ( current );
19401951
}
19411952
}
19421953
}

0 commit comments

Comments
 (0)