diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 30657f1741b..33ec2ed7e42 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -4125,6 +4125,7 @@ void TextEditorWidgetPrivate::registerActions() .contextAction(); m_visualizeWhitespaceAction = ActionBuilder(this, VISUALIZE_WHITESPACE) .setContext(m_editorContext) + .setCheckable(true) .addOnToggled( this, [this](bool checked) { @@ -4140,6 +4141,7 @@ void TextEditorWidgetPrivate::registerActions() .contextAction(); m_textWrappingAction = ActionBuilder(this, TEXT_WRAPPING) .setContext(m_editorContext) + .setCheckable(true) .addOnToggled( this, [this](bool checked) { diff --git a/src/plugins/texteditor/texteditorplugin.cpp b/src/plugins/texteditor/texteditorplugin.cpp index 5df9de54701..c774fed0438 100644 --- a/src/plugins/texteditor/texteditorplugin.cpp +++ b/src/plugins/texteditor/texteditorplugin.cpp @@ -453,7 +453,8 @@ void TextEditorPlugin::createEditorCommands() TextActionBuilder(this, VISUALIZE_WHITESPACE) .setText(Tr::tr("&Visualize Whitespace")) .setDefaultKeySequence(Tr::tr("Meta+E, Meta+V"), Tr::tr("Ctrl+E, Ctrl+V")) - .addToContainer(M_EDIT_ADVANCED, G_EDIT_FORMAT); + .addToContainer(M_EDIT_ADVANCED, G_EDIT_FORMAT) + .setCheckable(true); TextActionBuilder(this, CLEAN_WHITESPACE) .setText(Tr::tr("Clean Whitespace")) .addToContainer(M_EDIT_ADVANCED, G_EDIT_FORMAT);