mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-03 00:02:25 -05:00
use reference for fids in deleteFeatures and ensure that they exist until the end in qgsrelationeditorwidget
This commit is contained in:
parent
66a5dbf470
commit
b9348302c4
@ -1974,7 +1974,7 @@ Deletes a feature from the layer (but does not commit it).
|
||||
changes can be discarded by calling rollBack().
|
||||
%End
|
||||
|
||||
bool deleteFeatures( const QgsFeatureIds fids, DeleteContext *context = 0 );
|
||||
bool deleteFeatures( const QgsFeatureIds &fids, DeleteContext *context = 0 );
|
||||
%Docstring
|
||||
Deletes a set of features from the layer (but does not commit it)
|
||||
|
||||
|
@ -3240,7 +3240,7 @@ bool QgsVectorLayer::deleteFeature( QgsFeatureId fid, QgsVectorLayer::DeleteCont
|
||||
return res;
|
||||
}
|
||||
|
||||
bool QgsVectorLayer::deleteFeatures( const QgsFeatureIds fids, QgsVectorLayer::DeleteContext *context )
|
||||
bool QgsVectorLayer::deleteFeatures( const QgsFeatureIds &fids, QgsVectorLayer::DeleteContext *context )
|
||||
{
|
||||
bool res = true;
|
||||
const auto constFids = fids;
|
||||
|
@ -1858,7 +1858,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
|
||||
* to the underlying data provider until a commitChanges() call is made. Any uncommitted
|
||||
* changes can be discarded by calling rollBack().
|
||||
*/
|
||||
bool deleteFeatures( const QgsFeatureIds fids, DeleteContext *context = nullptr );
|
||||
bool deleteFeatures( const QgsFeatureIds &fids, DeleteContext *context = nullptr );
|
||||
|
||||
/**
|
||||
* Attempts to commit to the underlying data provider any buffered changes made since the
|
||||
|
@ -652,7 +652,8 @@ void QgsRelationEditorWidget::deleteFeature( const QgsFeatureId featureid )
|
||||
|
||||
void QgsRelationEditorWidget::deleteSelectedFeatures()
|
||||
{
|
||||
deleteFeatures( mFeatureSelectionMgr->selectedFeatureIds() );
|
||||
QgsFeatureIds selectedFids = mFeatureSelectionMgr->selectedFeatureIds();
|
||||
deleteFeatures( selectedFids );
|
||||
}
|
||||
|
||||
void QgsRelationEditorWidget::deleteFeatures( const QgsFeatureIds &featureids )
|
||||
|
Loading…
x
Reference in New Issue
Block a user