Skip to content
Permalink
Browse files
fix #4389
  • Loading branch information
jef-n committed Dec 17, 2011
1 parent 64292a8 commit 9d73af4e0297baa7083804f4bc376f88282563cf
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/app/attributetable/qgsattributetabledialog.cpp
@@ -806,6 +806,8 @@ void QgsAttributeTableDialog::updateExtent()

void QgsAttributeTableDialog::viewWillShowContextMenu( QMenu* menu, QModelIndex atIndex )
{
QModelIndex sourceIndex = mFilterModel->mapToSource( atIndex );

if ( mLayer->actions()->size() != 0 )
{

@@ -819,12 +821,12 @@ void QgsAttributeTableDialog::viewWillShowContextMenu( QMenu* menu, QModelIndex
if ( !action.runable() )
continue;

QgsAttributeTableAction *a = new QgsAttributeTableAction( action.name(), mView, mModel, i, atIndex );
QgsAttributeTableAction *a = new QgsAttributeTableAction( action.name(), mView, mModel, i, sourceIndex );
menu->addAction( action.name(), a, SLOT( execute() ) );
}
}

QgsAttributeTableAction *a = new QgsAttributeTableAction( tr( "Open form" ), mView, mModel, -1, atIndex );
QgsAttributeTableAction *a = new QgsAttributeTableAction( tr( "Open form" ), mView, mModel, -1, sourceIndex );
menu->addAction( tr( "Open form" ), a, SLOT( featureForm() ) );
}

0 comments on commit 9d73af4

Please sign in to comment.