mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Tweaked display name to capitalize the first letter and strip schema/geometry column from name of PG layers
git-svn-id: http://svn.osgeo.org/qgis/trunk@612 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
3a5a61c09d
commit
8ca1965c7f
@ -113,6 +113,16 @@ const char *cOgrLib = (const char *)ogrlib;
|
|||||||
// look at the fields in the layer and set the primary
|
// look at the fields in the layer and set the primary
|
||||||
// display field using some real fuzzy logic
|
// display field using some real fuzzy logic
|
||||||
setDisplayField();
|
setDisplayField();
|
||||||
|
QString layerTitle = baseName;
|
||||||
|
|
||||||
|
if(providerKey == "postgres"){
|
||||||
|
// adjust the display name for postgres layers
|
||||||
|
layerTitle = layerTitle.mid(layerTitle.find(".") +1);
|
||||||
|
layerTitle = layerTitle.left(layerTitle.find("("));
|
||||||
|
}
|
||||||
|
// upper case the first letter of the layer name
|
||||||
|
layerTitle = layerTitle.left(1).upper() + layerTitle.mid(1);
|
||||||
|
setLayerName(layerTitle);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
std::cout << "Unable to instantiate the data provider plugin\n";
|
std::cout << "Unable to instantiate the data provider plugin\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user