Skip to content

Commit

Permalink
Merge branch 'release-2_14' of github.com:qgis/QGIS into release-2_14
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Jun 30, 2016
2 parents c237ba7 + a3dfd9d commit 4158ea7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions python/plugins/fTools/tools/doPointsInPolygon.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@ def run(self):
value = math.sqrt(value)
atMap.append(value)

else: # no intersection - store at least the zero count
atMap.append(0)

outFeat.setAttributes(atMap)
writer.addFeature(outFeat)

Expand Down
4 changes: 2 additions & 2 deletions src/providers/mssql/qgsmssqlprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1851,7 +1851,7 @@ QgsVectorLayerImport::ImportError QgsMssqlProvider::createEmptyLayer(
QgsField fld = fields[i];
if ( oldToNewAttrIdxMap && fld.name() == primaryKey )
{
oldToNewAttrIdxMap->insert( fields.indexFromName( fld.name() ), 0 );
oldToNewAttrIdxMap->insert( fields.fieldNameIndex( fld.name() ), 0 );
continue;
}

Expand All @@ -1872,7 +1872,7 @@ QgsVectorLayerImport::ImportError QgsMssqlProvider::createEmptyLayer(

flist.append( fld );
if ( oldToNewAttrIdxMap )
oldToNewAttrIdxMap->insert( fields.indexFromName( fld.name() ), offset++ );
oldToNewAttrIdxMap->insert( fields.fieldNameIndex( fld.name() ), offset++ );
}

if ( !provider->addAttributes( flist ) )
Expand Down

0 comments on commit 4158ea7

Please sign in to comment.