Skip to content

Commit

Permalink
fix void context menu of map canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
vcloarec authored and nyalldawson committed Apr 1, 2023
1 parent 6d33c7c commit d6b0713
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/qgsmapcanvas.cpp
Expand Up @@ -1208,6 +1208,9 @@ void QgsMapCanvas::showContextMenu( QgsMapMouseEvent *event )
if ( !mapTool()->populateContextMenuWithEvent( &menu, event ) )
mMapTool->populateContextMenu( &menu );

if ( menu.isEmpty() ) // menu can be empty after populateContextMenu()
return;

emit contextMenuAboutToShow( &menu, event );

menu.exec( event->globalPos() );
Expand Down

0 comments on commit d6b0713

Please sign in to comment.