File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
src/core/providers/memory Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -616,9 +616,16 @@ QgsVectorDataProvider::Capabilities QgsMemoryProvider::capabilities() const
616
616
{
617
617
return AddFeatures | DeleteFeatures | ChangeGeometries |
618
618
ChangeAttributeValues | AddAttributes | DeleteAttributes | RenameAttributes | CreateSpatialIndex |
619
- SelectAtId | CircularGeometries;
619
+ SelectAtId | CircularGeometries | FastTruncate ;
620
620
}
621
621
622
+ bool QgsMemoryProvider::truncate ()
623
+ {
624
+ mFeatures .clear ();
625
+ clearMinMaxCache ();
626
+ mExtent .setMinimal ();
627
+ return true ;
628
+ }
622
629
623
630
void QgsMemoryProvider::updateExtents ()
624
631
{
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ class QgsMemoryProvider : public QgsVectorDataProvider
68
68
bool supportsSubsetString () const override { return true ; }
69
69
bool createSpatialIndex () override ;
70
70
QgsVectorDataProvider::Capabilities capabilities () const override ;
71
+ bool truncate () override ;
71
72
72
73
/* Implementation of functions from QgsDataProvider */
73
74
You can’t perform that action at this time.
0 commit comments