Skip to content
Permalink
Browse files

QgsOgrProvider::addAttributes(): call invalidateConnections() for Map…

…Info
  • Loading branch information
rouault committed May 4, 2016
1 parent 8ea4470 commit 02be0cb4d1d7399cacaa8742a385f84634ca5db6
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/providers/ogr/qgsogrprovider.cpp
@@ -1212,6 +1212,13 @@ bool QgsOgrProvider::addAttributes( const QList<QgsField> &attributes )
if ( !doInitialActionsForEdition() )
return false;

if ( ogrDriverName == "MapInfo File" )
{
// adding attributes in mapinfo requires to be able to delete the .dat file
// so drop any cached connections.
QgsOgrConnPool::instance()->invalidateConnections( filePath() );
}

bool returnvalue = true;

for ( QList<QgsField>::const_iterator iter = attributes.begin(); iter != attributes.end(); ++iter )

0 comments on commit 02be0cb

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