Skip to content
Permalink
Browse files

Merge pull request #3840 from DelazJ/selectedfeaturesids

Replace selectedFeaturesIds by selectedFeatureIds
  • Loading branch information
nyalldawson committed Dec 7, 2016
2 parents ea661e5 + e0912b8 commit 8a3c1efefe60d15fb109a1ef6412ce1a4276fdf9
Showing with 108 additions and 99 deletions.
  1. +9 −0 doc/api_break.dox
  2. +3 −3 python/core/qgsvectorlayer.sip
  3. +1 −1 python/gui/attributetable/qgsifeatureselectionmanager.sip
  4. +1 −1 python/plugins/processing/algs/qgis/SelectByAttributeSum.py
  5. +1 −1 python/plugins/processing/algs/qgis/SelectByExpression.py
  6. +1 −1 python/plugins/processing/algs/qgis/SelectByLocation.py
  7. +7 −7 src/analysis/vector/qgsgeometryanalyzer.cpp
  8. +2 −2 src/analysis/vector/qgsoverlayanalyzer.cpp
  9. +6 −6 src/app/qgisapp.cpp
  10. +1 −1 src/app/qgsattributeactiondialog.cpp
  11. +1 −1 src/app/qgsattributetabledialog.cpp
  12. +1 −1 src/app/qgsfieldcalculator.cpp
  13. +1 −1 src/app/qgsidentifyresultsdialog.cpp
  14. +1 −1 src/app/qgsmaptoolmovefeature.cpp
  15. +1 −1 src/app/qgsmaptooloffsetcurve.cpp
  16. +1 −1 src/app/qgsmaptoolrotatefeature.cpp
  17. +1 −1 src/app/qgsmaptoolselectutils.cpp
  18. +1 −1 src/app/qgsmergeattributesdialog.cpp
  19. +1 −1 src/core/qgsexpression.cpp
  20. +2 −2 src/core/qgsofflineediting.cpp
  21. +2 −2 src/core/qgsvectorfilewriter.cpp
  22. +3 −3 src/core/qgsvectorlayer.cpp
  23. +3 −3 src/core/qgsvectorlayer.h
  24. +1 −1 src/core/qgsvectorlayereditutils.cpp
  25. +1 −1 src/core/qgsvectorlayerimport.cpp
  26. +1 −1 src/core/qgsvectorlayerrenderer.cpp
  27. +3 −3 src/gui/attributetable/qgsattributetablefiltermodel.cpp
  28. +1 −1 src/gui/attributetable/qgsfeatureselectionmodel.cpp
  29. +1 −1 src/gui/attributetable/qgsgenericfeatureselectionmanager.cpp
  30. +1 −1 src/gui/attributetable/qgsgenericfeatureselectionmanager.h
  31. +1 −1 src/gui/attributetable/qgsifeatureselectionmanager.h
  32. +2 −2 src/gui/attributetable/qgsvectorlayerselectionmanager.cpp
  33. +1 −1 src/gui/attributetable/qgsvectorlayerselectionmanager.h
  34. +1 −1 src/gui/qgsattributeform.cpp
  35. +1 −1 src/gui/qgsfeatureselectiondlg.cpp
  36. +4 −4 src/gui/qgsrelationeditorwidget.cpp
  37. +2 −2 src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp
  38. +1 −1 src/plugins/geometry_checker/qgsgeometrychecker.cpp
  39. +1 −1 src/plugins/geometry_checker/ui/qgsgeometrycheckersetuptab.cpp
  40. +2 −2 src/plugins/geometry_checker/utils/qgsfeaturepool.cpp
  41. +1 −1 src/plugins/grass/qgsgrassmoduleparam.cpp
  42. +3 −3 src/plugins/spatialquery/qgsspatialquerydialog.cpp
  43. +1 −1 tests/src/core/testqgsexpression.cpp
  44. +1 −1 tests/src/python/test_provider_shapefile.py
  45. +26 −26 tests/src/python/test_qgsvectorlayer.py
@@ -199,12 +199,14 @@ Renamed Classes {#qgis_api_break_3_0_renamed_classes}
<tr><td>QgsApplication<td>defaultStyleV2Path<td>defaultStylePath
<tr><td>QgsApplication<td>userStyleV2Path<td>userStylePath
<tr><td>QgsComposerShape<td>setUseSymbolV2<td>setUseSymbol
<tr><td>QgsIFeatureSelectionManager<td>selectedFeaturesIds<td>selectedFeatureIds
<tr><td>QgsSymbolLayerUtils<td>createSymbolLayerV2ListFromSld<td>createSymbolLayerListFromSld
<tr><td>QgsVectorLayer<td>editorWidgetV2Config<td>editorWidgetConfig
<tr><td>QgsVectorLayer<td>editorWidgetV2Text<td>editorWidgetText
<tr><td>QgsVectorLayer<td>editorWidgetV2Type<td>editorWidgetType
<tr><td>QgsVectorLayer<td>deleteVertexV2<td>deleteVertex
<tr><td>QgsVectorLayer<td>rendererV2<td>renderer
<tr><td>QgsVectorLayer<td>selectedFeaturesIds<td>selectedFeatureIds
<tr><td>QgsVectorLayerEditUtils<td>deleteVertexV2<td>deleteVertex
<tr><td>QgsComposerSymbolItem<td>symbolV2<td>symbol
<tr><td>QgsServerInterface<td>capabiblitiesCache<td>capabilitiesCache
@@ -988,6 +990,12 @@ QgsHighlight {#qgis_api_break_3_0_QgsHighlight}
- The QgsHighlight constructor now takes a geometry reference, not a pointer.


QgsIFeatureSelectionManager {#qgis_api_break_3_0_QgsIFeatureSelectionManager}
---------------------------

- selectedFeaturesIds() has been renamed to selectedFeatureIds()


QgsJSONExporter {#qgis_api_break_3_0_QgsJSONExporter}
---------------

@@ -1578,6 +1586,7 @@ displayExpression instead. For the map tip use mapTipTemplate() instead.
- Signal layerDeleted() has been removed. Replaced by Qt signal destroyed().
- Deprecated editor widget methods and enums and structs: struct RangeData, enum FeatureFormSuppress, enum EditType, addAttributeEditorWidget(), editorWidgetV2(), editorWidgetConfig(), attributeEditorElements(), editType(), setEditType(), editorLayout(), setEditorLayout, setEditorWidgetV2Config(), setCheckedState(), editForm(), setEditForm(), featureFormSuppress(), setFeatureFormSuppress(), editFormInit(), setEditFormInit(), valueMap(), range(), dateFormat(), fieldEditable(), labelOnTop(), setFieldEditable() and setLabelOnTop(). Use editFormConfig()
- select() replaced by selectByRect()
- selectedFeaturesIds() replaced by selectedFeatureIds()
- setSelectedFeatures() replaced by selectByIds()
- applyNamedStyle() replaced by applyNamedStyle()
- isReadOnly() use readOnly()
@@ -572,7 +572,7 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
*
* @return A list of { @link QgsFeature } 's
*
* @see selectedFeaturesIds()
* @see selectedFeatureIds()
* @see selectedFeaturesIterator() which is more memory friendly when handling large selections
*/
QgsFeatureList selectedFeatures() const;
@@ -585,7 +585,7 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
*
* @return Iterator over the selected features
*
* @see selectedFeaturesIds()
* @see selectedFeatureIds()
* @see selectedFeatures()
*/
QgsFeatureIterator selectedFeaturesIterator( QgsFeatureRequest request = QgsFeatureRequest() ) const;
@@ -596,7 +596,7 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
* @return A list of { @link QgsFeatureId } 's
* @see selectedFeatures()
*/
const QgsFeatureIds &selectedFeaturesIds() const;
const QgsFeatureIds &selectedFeatureIds() const;

/** Returns the bounding box of the selected features. If there is no selection, QgsRectangle(0,0,0,0) is returned */
QgsRectangle boundingBoxOfSelected() const;
@@ -63,7 +63,7 @@ class QgsIFeatureSelectionManager : QObject
* @return A list of { @link QgsFeatureId } 's
* @see selectedFeatures()
*/
virtual const QgsFeatureIds &selectedFeaturesIds() const = 0;
virtual const QgsFeatureIds &selectedFeatureIds() const = 0;

signals:
/**
@@ -63,7 +63,7 @@ def processAlgorithm(self, progress):
fieldName = self.getParameterValue(self.FIELD)
value = self.getParameterValue(self.VALUE)

selected = layer.selectedFeaturesIds()
selected = layer.selectedFeatureIds()
if len(selected) == 0:
GeoAlgorithmExecutionException(
self.tr('There is no selection in the input layer. '
@@ -61,7 +61,7 @@ def defineCharacteristics(self):
def processAlgorithm(self, progress):
filename = self.getParameterValue(self.LAYERNAME)
layer = dataobjects.getObjectFromUri(filename)
oldSelection = set(layer.selectedFeaturesIds())
oldSelection = set(layer.selectedFeatureIds())
method = self.getParameterValue(self.METHOD)

if method == 0:
@@ -87,7 +87,7 @@ def processAlgorithm(self, progress):
predicates = self.getParameterValue(self.PREDICATE)
precision = self.getParameterValue(self.PRECISION)

oldSelection = set(inputLayer.selectedFeaturesIds())
oldSelection = set(inputLayer.selectedFeatureIds())
inputLayer.removeSelection()
index = vector.spatialindex(inputLayer)

@@ -58,7 +58,7 @@ bool QgsGeometryAnalyzer::simplify( QgsVectorLayer* layer,
if ( onlySelectedFeatures )
{
//use QgsVectorLayer::featureAtId
const QgsFeatureIds selection = layer->selectedFeaturesIds();
const QgsFeatureIds selection = layer->selectedFeatureIds();
if ( p )
{
p->setMaximum( selection.size() );
@@ -173,7 +173,7 @@ bool QgsGeometryAnalyzer::centroids( QgsVectorLayer* layer, const QString& shape
if ( onlySelectedFeatures )
{
//use QgsVectorLayer::featureAtId
const QgsFeatureIds selection = layer->selectedFeaturesIds();
const QgsFeatureIds selection = layer->selectedFeatureIds();
if ( p )
{
p->setMaximum( selection.size() );
@@ -396,7 +396,7 @@ bool QgsGeometryAnalyzer::convexHull( QgsVectorLayer* layer, const QString& shap
if ( onlySelectedFeatures )
{
//use QgsVectorLayer::featureAtId
const QgsFeatureIds selection = layer->selectedFeaturesIds();
const QgsFeatureIds selection = layer->selectedFeatureIds();
QgsFeatureIds::const_iterator it = selection.constBegin();
for ( ; it != selection.constEnd(); ++it )
{
@@ -447,7 +447,7 @@ bool QgsGeometryAnalyzer::convexHull( QgsVectorLayer* layer, const QString& shap
if ( onlySelectedFeatures )
{
//use QgsVectorLayer::featureAtId
const QgsFeatureIds selection = layer->selectedFeaturesIds();
const QgsFeatureIds selection = layer->selectedFeatureIds();
if ( p )
{
p->setMaximum( selection.size() );
@@ -594,7 +594,7 @@ bool QgsGeometryAnalyzer::dissolve( QgsVectorLayer* layer, const QString& shapef
if ( onlySelectedFeatures )
{
//use QgsVectorLayer::featureAtId
const QgsFeatureIds selection = layer->selectedFeaturesIds();
const QgsFeatureIds selection = layer->selectedFeatureIds();
QgsFeatureIds::const_iterator it = selection.constBegin();
for ( ; it != selection.constEnd(); ++it )
{
@@ -626,7 +626,7 @@ bool QgsGeometryAnalyzer::dissolve( QgsVectorLayer* layer, const QString& shapef
if ( onlySelectedFeatures )
{
//use QgsVectorLayer::featureAtId
const QgsFeatureIds selection = layer->selectedFeaturesIds();
const QgsFeatureIds selection = layer->selectedFeatureIds();
if ( p )
{
p->setMaximum( selection.size() );
@@ -744,7 +744,7 @@ bool QgsGeometryAnalyzer::buffer( QgsVectorLayer* layer, const QString& shapefil
if ( onlySelectedFeatures )
{
//use QgsVectorLayer::featureAtId
const QgsFeatureIds selection = layer->selectedFeaturesIds();
const QgsFeatureIds selection = layer->selectedFeatureIds();
if ( p )
{
p->setMaximum( selection.size() );
@@ -58,12 +58,12 @@ bool QgsOverlayAnalyzer::intersection( QgsVectorLayer* layerA, QgsVectorLayer* l
//take only selection
if ( onlySelectedFeatures )
{
QgsFeatureIds selectionB = layerB->selectedFeaturesIds();
QgsFeatureIds selectionB = layerB->selectedFeatureIds();
QgsFeatureRequest req = QgsFeatureRequest().setFilterFids( selectionB ).setSubsetOfAttributes( QgsAttributeList() );
QgsSpatialIndex index = QgsSpatialIndex( layerB->getFeatures( req ) );

//use QgsVectorLayer::featureAtId
const QgsFeatureIds selectionA = layerA->selectedFeaturesIds();
const QgsFeatureIds selectionA = layerA->selectedFeatureIds();
if ( p )
{
p->setMaximum( selectionA.size() );
@@ -6516,7 +6516,7 @@ void QgisApp::deleteSelected( QgsMapLayer *layer, QWidget* parent, bool promptCo
}

//validate selection
int numberOfSelectedFeatures = vlayer->selectedFeaturesIds().size();
int numberOfSelectedFeatures = vlayer->selectedFeatureIds().size();
if ( numberOfSelectedFeatures == 0 )
{
messageBar()->pushMessage( tr( "No Features Selected" ),
@@ -7023,7 +7023,7 @@ void QgisApp::mergeAttributesOfSelectedFeatures()
}

//get selected feature ids (as a QSet<int> )
const QgsFeatureIds& featureIdSet = vl->selectedFeaturesIds();
const QgsFeatureIds& featureIdSet = vl->selectedFeatureIds();
if ( featureIdSet.size() < 2 )
{
messageBar()->pushMessage(
@@ -7051,7 +7051,7 @@ void QgisApp::mergeAttributesOfSelectedFeatures()
QSet<int> toSkip = d.skippedAttributeIndexes();

bool firstFeature = true;
Q_FOREACH ( QgsFeatureId fid, vl->selectedFeaturesIds() )
Q_FOREACH ( QgsFeatureId fid, vl->selectedFeatureIds() )
{
for ( int i = 0; i < merged.count(); ++i )
{
@@ -7165,7 +7165,7 @@ void QgisApp::mergeSelectedFeatures()
}

//get selected feature ids (as a QSet<int> )
const QgsFeatureIds& featureIdSet = vl->selectedFeaturesIds();
const QgsFeatureIds& featureIdSet = vl->selectedFeatureIds();
if ( featureIdSet.size() < 2 )
{
messageBar()->pushMessage(
@@ -7176,7 +7176,7 @@ void QgisApp::mergeSelectedFeatures()
}

//get initial selection (may be altered by attribute merge dialog later)
QgsFeatureIds featureIds = vl->selectedFeaturesIds();
QgsFeatureIds featureIds = vl->selectedFeatureIds();
QgsFeatureList featureList = vl->selectedFeatures(); //get QList<QgsFeature>
bool canceled;
QgsGeometry unionGeom = unionGeometries( vl, featureList, canceled );
@@ -7199,7 +7199,7 @@ void QgisApp::mergeSelectedFeatures()
return;
}

QgsFeatureIds featureIdsAfter = vl->selectedFeaturesIds();
QgsFeatureIds featureIdsAfter = vl->selectedFeatureIds();

if ( featureIdsAfter.size() < 2 )
{
@@ -306,7 +306,7 @@ void QgsAttributeActionDialog::addDefaultActions()
insertRow( pos++, QgsAction::GenericPython, tr( "Clicked coordinates (Run feature actions tool)" ), QStringLiteral( "from qgis.PyQt import QtWidgets\n\nQtWidgets.QMessageBox.information(None, \"Clicked coords\", \"layer: [% @layer_id %]\\ncoords: ([% @click_x %],[% @click_y %])\")" ), QLatin1String( "" ), false, tr( "Clicked Coordinate" ), QSet<QString>() << QStringLiteral( "Canvas" ) );
insertRow( pos++, QgsAction::OpenUrl, tr( "Open file" ), QStringLiteral( "[% \"PATH\" %]" ), QLatin1String( "" ), false, tr( "Open file" ), QSet<QString>() << QStringLiteral( "Feature" ) << QStringLiteral( "Canvas" ) );
insertRow( pos++, QgsAction::OpenUrl, tr( "Search on web based on attribute's value" ), QStringLiteral( "http://www.google.com/search?q=[% \"ATTRIBUTE\" %]" ), QLatin1String( "" ), false, tr( "Search Web" ), QSet<QString>() << QStringLiteral( "Field" ) );
insertRow( pos++, QgsAction::GenericPython, tr( "List feature ids" ), QStringLiteral( "from qgis.PyQt import QtWidgets\n\nlayer = QgsMapLayerRegistry.instance().mapLayer('[% @layer_id %]')\nif layer.selectedFeatureCount():\n ids = layer.selectedFeaturesIds()\nelse:\n ids = [f.id() for f in layer.getFeatures()]\n\nQtWidgets.QMessageBox.information(None, \"Feature ids\", ', '.join([str(id) for id in ids]))" ), QLatin1String( "" ), false, tr( "List feature ids" ), QSet<QString>() << QStringLiteral( "Layer" ) );
insertRow( pos++, QgsAction::GenericPython, tr( "List feature ids" ), QStringLiteral( "from qgis.PyQt import QtWidgets\n\nlayer = QgsMapLayerRegistry.instance().mapLayer('[% @layer_id %]')\nif layer.selectedFeatureCount():\n ids = layer.selectedFeatureIds()\nelse:\n ids = [f.id() for f in layer.getFeatures()]\n\nQtWidgets.QMessageBox.information(None, \"Feature ids\", ', '.join([str(id) for id in ids]))" ), QLatin1String( "" ), false, tr( "List feature ids" ), QSet<QString>() << QStringLiteral( "Layer" ) );
}

void QgsAttributeActionDialog::itemDoubleClicked( QTableWidgetItem* item )
@@ -436,7 +436,7 @@ void QgsAttributeTableDialog::updateFieldFromExpression()

void QgsAttributeTableDialog::updateFieldFromExpressionSelected()
{
QgsFeatureIds filteredIds = mLayer->selectedFeaturesIds();
QgsFeatureIds filteredIds = mLayer->selectedFeatureIds();
runFieldCalculation( mLayer, mFieldCombo->currentText(), mUpdateExpressionText->asExpression(), filteredIds );
}

@@ -276,7 +276,7 @@ void QgsFieldCalculator::accept()
QgsFeatureRequest req = QgsFeatureRequest().setFlags( useGeometry ? QgsFeatureRequest::NoFlags : QgsFeatureRequest::NoGeometry );
if ( mOnlyUpdateSelectedCheckBox->isChecked() )
{
req.setFilterFids( mVectorLayer->selectedFeaturesIds() );
req.setFilterFids( mVectorLayer->selectedFeatureIds() );
}
QgsFeatureIterator fit = mVectorLayer->getFeatures( req );
while ( fit.nextFeature( feature ) )
@@ -1915,7 +1915,7 @@ void QgsIdentifyResultsDialog::toggleFeatureSelection()
if ( !vl )
return;

if ( vl->selectedFeaturesIds().contains( item->feature().id() ) )
if ( vl->selectedFeatureIds().contains( item->feature().id() ) )
vl->deselect( item->feature().id() );
else
vl->select( item->feature().id() );
@@ -130,7 +130,7 @@ void QgsMapToolMoveFeature::cadCanvasReleaseEvent( QgsMapMouseEvent* e )
}
else
{
mMovedFeatures = vlayer->selectedFeaturesIds();
mMovedFeatures = vlayer->selectedFeatureIds();

mRubberBand = createRubberBand( vlayer->geometryType() );
QgsFeature feat;
@@ -284,7 +284,7 @@ QgsGeometry QgsMapToolOffsetCurve::createOriginGeometry( QgsVectorLayer* vl, con
}

//for background layers, try to merge selected entries together if snapped feature is contained in selection
const QgsFeatureIds& selection = vl->selectedFeaturesIds();
const QgsFeatureIds& selection = vl->selectedFeatureIds();
if ( selection.size() < 1 || !selection.contains( match.featureId() ) )
{
return convertToSingleLine( snappedFeature.geometry(), partVertexNr, mMultiPartGeometry );
@@ -279,7 +279,7 @@ void QgsMapToolRotateFeature::canvasReleaseEvent( QgsMapMouseEvent* e )
}
else
{
mRotatedFeatures = vlayer->selectedFeaturesIds();
mRotatedFeatures = vlayer->selectedFeatureIds();

mRubberBand = createRubberBand( vlayer->geometryType() ) ;

@@ -129,7 +129,7 @@ void QgsMapToolSelectUtils::selectSingleFeature( QgsMapCanvas* canvas, const Qgs
if ( e->modifiers() & Qt::ShiftModifier || e->modifiers() & Qt::ControlModifier )
{
QgsFeatureId selectId = *selectedFeatures.constBegin();
QgsFeatureIds layerSelectedFeatures = vlayer->selectedFeaturesIds();
QgsFeatureIds layerSelectedFeatures = vlayer->selectedFeatureIds();
if ( layerSelectedFeatures.contains( selectId ) )
behaviour = QgsVectorLayer::RemoveFromSelection;
else
@@ -464,7 +464,7 @@ void QgsMergeAttributesDialog::on_mRemoveFeatureFromSelectionButton_clicked()
selectedRowChanged();

//remove feature from the vector layer selection
QgsFeatureIds selectedIds = mVectorLayer->selectedFeaturesIds();
QgsFeatureIds selectedIds = mVectorLayer->selectedFeatureIds();
selectedIds.remove( featureId );
mVectorLayer->selectByIds( selectedIds );
mMapCanvas->repaint();
@@ -1493,7 +1493,7 @@ static QVariant fcnIsSelected( const QVariantList& values, const QgsExpressionCo
return QVariant( QVariant::Bool );
}

return layer->selectedFeaturesIds().contains( feature.id() );
return layer->selectedFeatureIds().contains( feature.id() );
}

static QVariant fcnNumSelected( const QVariantList& values, const QgsExpressionContext* context, QgsExpression* parent )
@@ -627,7 +627,7 @@ QgsVectorLayer* QgsOfflineEditing::copyVectorLayer( QgsVectorLayer* layer, sqlit

if ( onlySelected )
{
QgsFeatureIds selectedFids = layer->selectedFeaturesIds();
QgsFeatureIds selectedFids = layer->selectedFeatureIds();
if ( !selectedFids.isEmpty() )
req.setFilterFids( selectedFids );
}
@@ -636,7 +636,7 @@ QgsVectorLayer* QgsOfflineEditing::copyVectorLayer( QgsVectorLayer* layer, sqlit

if ( req.filterType() == QgsFeatureRequest::FilterFids )
{
emit progressModeSet( QgsOfflineEditing::CopyFeatures, layer->selectedFeaturesIds().size() );
emit progressModeSet( QgsOfflineEditing::CopyFeatures, layer->selectedFeatureIds().size() );
}
else
{
@@ -2379,7 +2379,7 @@ QgsVectorFileWriter::writeAsVectorFormat( QgsVectorLayer* layer,
QgsFeatureRequest req;
if ( options.onlySelectedFeatures )
{
req.setFilterFids( layer->selectedFeaturesIds() );
req.setFilterFids( layer->selectedFeatureIds() );
}
QgsFeatureIterator fit = layer->getFeatures( req );
QgsFeature fet;
@@ -2455,7 +2455,7 @@ QgsVectorFileWriter::writeAsVectorFormat( QgsVectorLayer* layer,
}
req.setSubsetOfAttributes( attributes );
if ( options.onlySelectedFeatures )
req.setFilterFids( layer->selectedFeaturesIds() );
req.setFilterFids( layer->selectedFeatureIds() );
QgsFeatureIterator fit = layer->getFeatures( req );

//create symbol table if needed
@@ -325,7 +325,7 @@ void QgsVectorLayer::selectByExpression( const QString& expression, QgsVectorLay

if ( behaviour == AddToSelection )
{
newSelection = selectedFeaturesIds();
newSelection = selectedFeatureIds();
}
QgsFeature feat;
while ( features.nextFeature( feat ) )
@@ -339,7 +339,7 @@ void QgsVectorLayer::selectByExpression( const QString& expression, QgsVectorLay
QgsExpression exp( expression );
exp.prepare( &context );

QgsFeatureIds oldSelection = selectedFeaturesIds();
QgsFeatureIds oldSelection = selectedFeatureIds();
QgsFeatureRequest request = QgsFeatureRequest().setFilterFids( oldSelection );

//refine request
@@ -2466,7 +2466,7 @@ int QgsVectorLayer::selectedFeatureCount() const
return mSelectedFeatureIds.size();
}

const QgsFeatureIds& QgsVectorLayer::selectedFeaturesIds() const
const QgsFeatureIds& QgsVectorLayer::selectedFeatureIds() const
{
return mSelectedFeatureIds;
}

0 comments on commit 8a3c1ef

Please sign in to comment.
You can’t perform that action at this time.