Skip to content

Commit

Permalink
handle 64bit feature ids in selections (fixes #13001)
Browse files Browse the repository at this point in the history
(cherry picked from commit 1a6aee1)
  • Loading branch information
jef-n committed Jun 30, 2015
1 parent 711aa1e commit 07e9e0f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/core/qgsvectorlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2347,7 +2347,7 @@ QgsFeatureList QgsVectorLayer::selectedFeatures()
{
// for small amount of selected features, fetch them directly
// because request with FilterFids would go iterate over the whole layer
foreach ( int fid, mSelectedFeatureIds )
foreach ( QgsFeatureId fid, mSelectedFeatureIds )
{
getFeatures( QgsFeatureRequest( fid ) ).nextFeature( f );
features << f;
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/spatialquery/qgsspatialquerydialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ QString QgsSpatialQueryDialog::getSubsetFIDs( const QgsFeatureIds *fids, QString
QString qReturn = qFormat.arg( fieldFID ).arg( lstFID.join( "," ) );
lstFID.clear();
return qReturn;
} // QString QgsSpatialQueryDialog::getSubsetFIDs( const QSet< int > *fids, QString fieldFID )
} // QString QgsSpatialQueryDialog::getSubsetFIDs( const QgsFeatureIds *fids, QString fieldFID )

QgsSpatialQueryDialog::TypeVerifyCreateSubset QgsSpatialQueryDialog::verifyCreateSubset( QString &msg, QString &fieldFID )
{
Expand Down Expand Up @@ -656,7 +656,7 @@ void QgsSpatialQueryDialog::changeLwFeature( QgsVectorLayer* lyr, QgsFeatureId f
}
lwFeatures->setEnabled( true );
lwFeatures->setFocus();
} // void QgsSpatialQueryDialog::changeLwFeature( QListWidget *listWidget, QgsVectorLayer* lyr, int fid )
} // void QgsSpatialQueryDialog::changeLwFeature( QgsVectorLayer* lyr, QgsFeatureId fid )

void QgsSpatialQueryDialog::zoomFeature( QgsVectorLayer* lyr, QgsFeatureId fid )
{
Expand Down Expand Up @@ -711,7 +711,7 @@ void QgsSpatialQueryDialog::zoomFeature( QgsVectorLayer* lyr, QgsFeatureId fid )
mIface->mapCanvas()->setExtent( rectExtent );
}
mIface->mapCanvas()->refresh();
} // void QgsSpatialQueryDialog::zoomFeatureTarget(QgsVectorLayer* lyr, int fid)
} // void QgsSpatialQueryDialog::zoomFeature( QgsVectorLayer* lyr, QgsFeatureId fid )

void QgsSpatialQueryDialog::showRubberFeature( QgsVectorLayer* lyr, QgsFeatureId id )
{
Expand Down
2 changes: 1 addition & 1 deletion src/server/qgswfsserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1641,7 +1641,7 @@ QgsFeatureIds QgsWFSServer::getFeatureIdsFromFilter( QDomElement filterElem, Qgs
fid = fidElem.attribute( "fid" );
if ( fid.contains( "." ) )
fid = fid.section( ".", 1, 1 );
fids.insert( fid.toInt( &conversionSuccess ) );
fids.insert( fid.toLongLong( &conversionSuccess ) );
}
}
else
Expand Down

0 comments on commit 07e9e0f

Please sign in to comment.