git-svn-id: http://svn.osgeo.org/qgis/trunk@13016 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
jef 2010-03-07 18:14:35 +00:00
parent 23ed0fefc4
commit c0d78c1672

View File

@ -356,11 +356,16 @@ void QgsIdentifyResults::contextMenuEvent( QContextMenuEvent* event )
mActionPopup = new QMenu();
mActionPopup->addAction( vlayer->isEditable() ? tr( "Edit feature form" ) : tr( "View feature form" ), this, SLOT( featureForm() ) );
mActionPopup->addAction( tr( "Zoom to feature" ), this, SLOT( zoomToFeature() ) );
mActionPopup->addAction( tr( "Copy attribute value" ), this, SLOT( copyAttributeValue() ) );
mActionPopup->addAction( tr( "Copy feature attributes" ), this, SLOT( copyFeatureAttributes() ) );
mActionPopup->addSeparator();
QTreeWidgetItem *featItem = featureItem( item );
if ( featItem )
{
mActionPopup->addAction( vlayer->isEditable() ? tr( "Edit feature form" ) : tr( "View feature form" ), this, SLOT( featureForm() ) );
mActionPopup->addAction( tr( "Zoom to feature" ), this, SLOT( zoomToFeature() ) );
mActionPopup->addAction( tr( "Copy attribute value" ), this, SLOT( copyAttributeValue() ) );
mActionPopup->addAction( tr( "Copy feature attributes" ), this, SLOT( copyFeatureAttributes() ) );
mActionPopup->addSeparator();
}
mActionPopup->addAction( tr( "Clear results" ), this, SLOT( clear() ) );
mActionPopup->addAction( tr( "Clear highlights" ), this, SLOT( clearRubberbands() ) );
mActionPopup->addAction( tr( "Highlight all" ), this, SLOT( highlightAll() ) );
@ -558,6 +563,8 @@ QgsVectorLayer *QgsIdentifyResults::vectorLayer( QTreeWidgetItem *item )
QTreeWidgetItem *QgsIdentifyResults::retrieveAttributes( QTreeWidgetItem *item, QList< QPair<QString, QString> > &attributes, int &idx )
{
QTreeWidgetItem *featItem = featureItem( item );
if ( !featItem )
return 0;
idx = -1;