aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2024-02-19 12:05:17 +0100
committerEike Ziller <eike.ziller@qt.io>2024-02-19 11:48:28 +0000
commit8a532af3af4a000d0044a69f232c748ad6c1a1ea (patch)
treee7cf530dc84ca1dd4acf9bf2fd72069e3ba17d82 /src/plugins/texteditor
parentcfb26a06a7fc63363ffc61e4f3e12c0efd440b48 (diff)
Markdown: Fix the Show Editor/Preview buttons
Calling QToolButton::setCheckable on a button with a defaultAction doesn't work as expected. It needs to be called on the action itself. Amends acedf93ba32467a9848cebe25da35c096a5993ae Fixes: QTCREATORBUG-30382 Change-Id: Icbddb1d331fe6547622bf0428d890012fef0d9c5 Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/texteditor')
-rw-r--r--src/plugins/texteditor/markdowneditor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/texteditor/markdowneditor.cpp b/src/plugins/texteditor/markdowneditor.cpp
index 6d91225dbc..dbfdcda2b4 100644
--- a/src/plugins/texteditor/markdowneditor.cpp
+++ b/src/plugins/texteditor/markdowneditor.cpp
@@ -138,12 +138,12 @@ public:
agg->add(m_widget.get());
m_togglePreviewVisible = Command::createToolButtonWithShortcutToolTip(TOGGLEPREVIEW_ACTION);
- m_togglePreviewVisible->setCheckable(true);
+ m_togglePreviewVisible->defaultAction()->setCheckable(true);
m_togglePreviewVisible->setChecked(showPreview);
m_previewWidget->setVisible(showPreview);
m_toggleEditorVisible = Command::createToolButtonWithShortcutToolTip(TOGGLEEDITOR_ACTION);
- m_toggleEditorVisible->setCheckable(true);
+ m_toggleEditorVisible->defaultAction()->setCheckable(true);
m_toggleEditorVisible->setChecked(showEditor);
m_textEditorWidget->setVisible(showEditor);