From d187022892bad0591dd8d8e2a2d44bcddac1995d Mon Sep 17 00:00:00 2001 From: David Schulz Date: Tue, 16 Mar 2021 11:30:15 +0100 Subject: [PATCH] TextEditor: update codeStyle after setting language id This updates the tab settings to the correct one for the specific language like C++ or QML. Only observable if the file is not part of a project. Otherwise the project code style settings will set the language specific tab settings. Fixes: QTCREATORBUG-25485 Change-Id: I736646557a213369903fe495e3b5a3a950141961 Reviewed-by: Christian Stenger --- src/plugins/texteditor/texteditor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index e5b5a2b2ea5..8a435d3ede4 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -6010,6 +6010,7 @@ void TextEditorWidgetPrivate::toggleBlockVisible(const QTextBlock &block) void TextEditorWidget::setLanguageSettingsId(Id settingsId) { d->m_tabSettingsId = settingsId; + setCodeStyle(TextEditorSettings::codeStyle(settingsId)); } Id TextEditorWidget::languageSettingsId() const