@@ -743,7 +743,7 @@ void QgsIdentifyResults::featureDeleted( QgsFeatureId fid )
743
743
{
744
744
QTreeWidgetItem *featItem = layItem->child ( i );
745
745
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 )
747
747
{
748
748
delete mHighlights .take ( featItem );
749
749
delete featItem;
@@ -774,7 +774,7 @@ void QgsIdentifyResults::attributeValueChanged( QgsFeatureId fid, int idx, const
774
774
{
775
775
QTreeWidgetItem *featItem = layItem->child ( i );
776
776
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 )
778
778
{
779
779
if ( featItem->data ( 0 , Qt::DisplayRole ).toString () == vlayer->displayField () )
780
780
featItem->setData ( 1 , Qt::DisplayRole, val );
@@ -808,7 +808,7 @@ void QgsIdentifyResults::highlightFeature( QTreeWidgetItem *item )
808
808
if ( mHighlights .contains ( featItem ) )
809
809
return ;
810
810
811
- QgsFeatureId fid = featItem->data ( 0 , Qt::UserRole ). toInt ( );
811
+ QgsFeatureId fid = STRING_TO_FID ( featItem->data ( 0 , Qt::UserRole ) );
812
812
813
813
QgsFeature feat;
814
814
if ( !layer->featureAtId ( fid, feat, true , false ) )
@@ -843,7 +843,7 @@ void QgsIdentifyResults::zoomToFeature()
843
843
if ( !featItem )
844
844
return ;
845
845
846
- int fid = featItem->data ( 0 , Qt::UserRole ). toInt ( );
846
+ int fid = STRING_TO_FID ( featItem->data ( 0 , Qt::UserRole ) );
847
847
848
848
QgsFeature feat;
849
849
if ( ! layer->featureAtId ( fid, feat, true , false ) )
@@ -881,7 +881,7 @@ void QgsIdentifyResults::featureForm()
881
881
if ( !featItem )
882
882
return ;
883
883
884
- int fid = featItem->data ( 0 , Qt::UserRole ). toInt ( );
884
+ int fid = STRING_TO_FID ( featItem->data ( 0 , Qt::UserRole ) );
885
885
int idx = featItem->data ( 0 , Qt::UserRole + 1 ).toInt ();
886
886
887
887
QgsFeature f;
0 commit comments