diff --git a/src/app/labeling/qgsmaptoolshowhidelabels.cpp b/src/app/labeling/qgsmaptoolshowhidelabels.cpp index ee5a21d8b54e..a3693487ed5c 100644 --- a/src/app/labeling/qgsmaptoolshowhidelabels.cpp +++ b/src/app/labeling/qgsmaptoolshowhidelabels.cpp @@ -56,8 +56,8 @@ void QgsMapToolShowHideLabels::canvasPressEvent( QgsMapMouseEvent *e ) return; int showCol; - if ( !labelCanShowHide( vlayer, showCol ) - || !diagramCanShowHide( vlayer, showCol ) ) + if ( ( vlayer->labelsEnabled() && !labelCanShowHide( vlayer, showCol ) ) + || ( vlayer->diagramsEnabled() && !diagramCanShowHide( vlayer, showCol ) ) ) { if ( !vlayer->auxiliaryLayer() ) {