mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
QgsOgrProvider::addAttributes(): call invalidateConnections() for MapInfo
This commit is contained in:
parent
8ea447065c
commit
02be0cb4d1
@ -1212,6 +1212,13 @@ bool QgsOgrProvider::addAttributes( const QList<QgsField> &attributes )
|
|||||||
if ( !doInitialActionsForEdition() )
|
if ( !doInitialActionsForEdition() )
|
||||||
return false;
|
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;
|
bool returnvalue = true;
|
||||||
|
|
||||||
for ( QList<QgsField>::const_iterator iter = attributes.begin(); iter != attributes.end(); ++iter )
|
for ( QList<QgsField>::const_iterator iter = attributes.begin(); iter != attributes.end(); ++iter )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user