Skip to content

Commit

Permalink
fix #4389
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Dec 17, 2011
1 parent 64292a8 commit 9d73af4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/attributetable/qgsattributetabledialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,8 @@ void QgsAttributeTableDialog::updateExtent()

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

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

Expand All @@ -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() ) );
}

Expand Down

0 comments on commit 9d73af4

Please sign in to comment.