File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1319,6 +1319,8 @@ bool QgsOgrProvider::addFeatures( QgsFeatureList &flist )
1319
1319
1320
1320
setRelevantFields ( ogrLayer, true , attributeIndexes () );
1321
1321
1322
+ const bool inTransaction = startTransaction ();
1323
+
1322
1324
bool returnvalue = true ;
1323
1325
for ( QgsFeatureList::iterator it = flist.begin (); it != flist.end (); ++it )
1324
1326
{
@@ -1328,6 +1330,11 @@ bool QgsOgrProvider::addFeatures( QgsFeatureList &flist )
1328
1330
}
1329
1331
}
1330
1332
1333
+ if ( inTransaction )
1334
+ {
1335
+ commitTransaction ();
1336
+ }
1337
+
1331
1338
if ( !syncToDisc () )
1332
1339
{
1333
1340
returnvalue = false ;
@@ -1818,6 +1825,8 @@ bool QgsOgrProvider::deleteFeatures( const QgsFeatureIds &id )
1818
1825
if ( !doInitialActionsForEdition () )
1819
1826
return false ;
1820
1827
1828
+ const bool inTransaction = startTransaction ();
1829
+
1821
1830
bool returnvalue = true ;
1822
1831
for ( QgsFeatureIds::const_iterator it = id.begin (); it != id.end (); ++it )
1823
1832
{
@@ -1827,6 +1836,11 @@ bool QgsOgrProvider::deleteFeatures( const QgsFeatureIds &id )
1827
1836
}
1828
1837
}
1829
1838
1839
+ if ( inTransaction )
1840
+ {
1841
+ commitTransaction ();
1842
+ }
1843
+
1830
1844
if ( !syncToDisc () )
1831
1845
{
1832
1846
returnvalue = false ;
You can’t perform that action at this time.
0 commit comments