Skip to content

Commit

Permalink
Identify GetFeatureInfo Url context menu fix
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed Mar 14, 2013
1 parent 5d31269 commit 413b4ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/qgsidentifyresultsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,6 @@ void QgsIdentifyResultsDialog::addFeature( QgsRasterLayer *layer,
layItem = new QTreeWidgetItem( QStringList() << QString::number( lstResults->topLevelItemCount() ) << layer->name() );
layItem->setData( 0, Qt::UserRole, QVariant::fromValue( qobject_cast<QObject *>( layer ) ) );

layItem->setData( 0, GetFeatureInfoUrlRole, params.value( "getFeatureInfoUrl" ) );
lstResults->addTopLevelItem( layItem );

QComboBox *formatCombo = new QComboBox();
Expand Down Expand Up @@ -481,6 +480,8 @@ void QgsIdentifyResultsDialog::addFeature( QgsRasterLayer *layer,
connect( layer, SIGNAL( destroyed() ), this, SLOT( layerDestroyed() ) );
connect( layer, SIGNAL( layerCrsChanged() ), this, SLOT( layerDestroyed() ) );
}
// Set/reset getFeatureInfoUrl (currently only available for Feature, so it may change if format changes)
layItem->setData( 0, GetFeatureInfoUrlRole, params.value( "getFeatureInfoUrl" ) );

QgsIdentifyResultsFeatureItem *featItem = new QgsIdentifyResultsFeatureItem( fields, feature, layer->crs(), QStringList() << label << "" );
layItem->addChild( featItem );
Expand Down

0 comments on commit 413b4ce

Please sign in to comment.