Skip to content
Permalink
Browse files

Saver attribute map handling (no insertion of additional entry if a c…

…olumn does not exist)

git-svn-id: http://svn.osgeo.org/qgis/trunk@15388 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Mar 8, 2011
1 parent dce9d14 commit caa0cae3b9d057ab597ef0072d449abbc7a74932
Showing with 14 additions and 2 deletions.
  1. +14 −2 src/providers/ogr/qgsogrprovider.cpp
@@ -1902,7 +1902,13 @@ void QgsOgrProvider::uniqueValues( int index, QList<QVariant> &uniqueValues, int

QVariant QgsOgrProvider::minimumValue( int index )
{
QgsField fld = mAttributeFields[index];
QgsFieldMap::const_iterator attIt = mAttributeFields.find( index );
if ( attIt == mAttributeFields.constEnd() )
{
return QVariant();
}
const QgsField& fld = attIt.value();

QString theLayerName = OGR_FD_GetName( OGR_L_GetLayerDefn( ogrLayer ) );

QString sql = QString( "SELECT MIN(%1) FROM %2" )
@@ -1936,7 +1942,13 @@ QVariant QgsOgrProvider::minimumValue( int index )

QVariant QgsOgrProvider::maximumValue( int index )
{
QgsField fld = mAttributeFields[index];
QgsFieldMap::const_iterator attIt = mAttributeFields.find( index );
if ( attIt == mAttributeFields.constEnd() )
{
return QVariant();
}
const QgsField& fld = mAttributeFields[index];

QString theLayerName = OGR_FD_GetName( OGR_L_GetLayerDefn( ogrLayer ) );

QString sql = QString( "SELECT MAX(%1) FROM %2" )

0 comments on commit caa0cae

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