diff --git a/src/app/qgsmaptoolshowhidelabels.cpp b/src/app/qgsmaptoolshowhidelabels.cpp index 3676ecc5dc87..7130312faf81 100644 --- a/src/app/qgsmaptoolshowhidelabels.cpp +++ b/src/app/qgsmaptoolshowhidelabels.cpp @@ -173,10 +173,10 @@ void QgsMapToolShowHideLabels::showHideLabels( QMouseEvent * e ) labelChanged = true; } } - vlayer->endEditCommand(); if ( labelChanged ) { + vlayer->endEditCommand(); mCanvas->refresh(); } else