Skip to content

Commit d133099

Browse files
committedJun 18, 2012
fix identify with 64bit fids
1 parent 56ea83f commit d133099

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎src/app/qgsidentifyresults.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ void QgsIdentifyResults::featureDeleted( QgsFeatureId fid )
743743
{
744744
QTreeWidgetItem *featItem = layItem->child( i );
745745

746-
if ( featItem && featItem->data( 0, Qt::UserRole ).toString() == FID_TO_STRING( fid ) )
746+
if ( featItem && STRING_TO_FID( featItem->data( 0, Qt::UserRole ) ) == fid )
747747
{
748748
delete mHighlights.take( featItem );
749749
delete featItem;
@@ -774,7 +774,7 @@ void QgsIdentifyResults::attributeValueChanged( QgsFeatureId fid, int idx, const
774774
{
775775
QTreeWidgetItem *featItem = layItem->child( i );
776776

777-
if ( featItem && featItem->data( 0, Qt::UserRole ).toString() == FID_TO_STRING( fid ) )
777+
if ( featItem && STRING_TO_FID( featItem->data( 0, Qt::UserRole ) ) == fid )
778778
{
779779
if ( featItem->data( 0, Qt::DisplayRole ).toString() == vlayer->displayField() )
780780
featItem->setData( 1, Qt::DisplayRole, val );
@@ -808,7 +808,7 @@ void QgsIdentifyResults::highlightFeature( QTreeWidgetItem *item )
808808
if ( mHighlights.contains( featItem ) )
809809
return;
810810

811-
QgsFeatureId fid = featItem->data( 0, Qt::UserRole ).toInt();
811+
QgsFeatureId fid = STRING_TO_FID( featItem->data( 0, Qt::UserRole ) );
812812

813813
QgsFeature feat;
814814
if ( !layer->featureAtId( fid, feat, true, false ) )
@@ -843,7 +843,7 @@ void QgsIdentifyResults::zoomToFeature()
843843
if ( !featItem )
844844
return;
845845

846-
int fid = featItem->data( 0, Qt::UserRole ).toInt();
846+
int fid = STRING_TO_FID( featItem->data( 0, Qt::UserRole ) );
847847

848848
QgsFeature feat;
849849
if ( ! layer->featureAtId( fid, feat, true, false ) )
@@ -881,7 +881,7 @@ void QgsIdentifyResults::featureForm()
881881
if ( !featItem )
882882
return;
883883

884-
int fid = featItem->data( 0, Qt::UserRole ).toInt();
884+
int fid = STRING_TO_FID( featItem->data( 0, Qt::UserRole ) );
885885
int idx = featItem->data( 0, Qt::UserRole + 1 ).toInt();
886886

887887
QgsFeature f;

0 commit comments

Comments
 (0)
Please sign in to comment.