Skip to content

Commit 3738c91

Browse files
committed
Fix loss of attributes for OGR provider (followup 72c9830)
Cherry-picked from cc13c57
1 parent 86fe4d5 commit 3738c91

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/providers/ogr/qgsogrprovider.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,6 +1284,7 @@ bool QgsOgrProvider::changeAttributeValues( const QgsChangedAttributesMap &attr_
12841284
{
12851285
pushError( tr( "OGR error syncing to disk: %1" ).arg( CPLGetLastErrorMsg() ) );
12861286
}
1287+
QgsOgrConnPool::instance()->invalidateConnections( filePath() );
12871288
return true;
12881289
}
12891290

@@ -1348,6 +1349,7 @@ bool QgsOgrProvider::changeGeometryValues( QgsGeometryMap & geometry_map )
13481349

13491350
OGR_F_Destroy( theOGRFeature );
13501351
}
1352+
QgsOgrConnPool::instance()->invalidateConnections( filePath() );
13511353
return syncToDisc();
13521354
}
13531355

@@ -1607,17 +1609,17 @@ static QString createFileFilter_( QString const &longName, QString const &glob )
16071609

16081610
QString createFilters( QString type )
16091611
{
1610-
/**Database drivers available*/
1612+
/** Database drivers available*/
16111613
static QString myDatabaseDrivers;
1612-
/**Protocol drivers available*/
1614+
/** Protocol drivers available*/
16131615
static QString myProtocolDrivers;
1614-
/**File filters*/
1616+
/** File filters*/
16151617
static QString myFileFilters;
1616-
/**Directory drivers*/
1618+
/** Directory drivers*/
16171619
static QString myDirectoryDrivers;
1618-
/**Extensions*/
1620+
/** Extensions*/
16191621
static QStringList myExtensions;
1620-
/**Wildcards*/
1622+
/** Wildcards*/
16211623
static QStringList myWildcards;
16221624

16231625
// if we've already built the supported vector string, just return what
@@ -2014,7 +2016,7 @@ QGISEXTERN bool isProvider()
20142016
return true;
20152017
}
20162018

2017-
/**Creates an empty data source
2019+
/** Creates an empty data source
20182020
@param uri location to store the file(s)
20192021
@param format data format (e.g. "ESRI Shapefile"
20202022
@param vectortype point/line/polygon or multitypes

0 commit comments

Comments
 (0)