Skip to content
Permalink
Browse files

Test map canvas pointer already when showing context menu

  • Loading branch information
mhugent committed Jan 7, 2016
1 parent 36c6283 commit 1bc2c392fdefcf232dc3b22bdabaa919d18757b7
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/gui/attributetable/qgsdualview.cpp
@@ -354,8 +354,9 @@ void QgsDualView::viewWillShowContextMenu( QMenu* menu, const QModelIndex& atInd
}

QgsVectorLayer* vl = mFilterModel->layer();
if ( vl && vl->geometryType() != QGis::NoGeometry )
{
QgsMapCanvas* canvas = mFilterModel->mapCanvas();
if ( canvas && vl && vl->geometryType() != QGis::NoGeometry )
{
menu->addAction( tr( "Zoom to feature" ), this, SLOT( zoomToCurrentFeature() ) );
}

0 comments on commit 1bc2c39

Please sign in to comment.
You can’t perform that action at this time.