forked from qt-creator/qt-creator
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 <christian.stenger@qt.io>
This commit is contained in:
@@ -6010,6 +6010,7 @@ void TextEditorWidgetPrivate::toggleBlockVisible(const QTextBlock &block)
|
|||||||
void TextEditorWidget::setLanguageSettingsId(Id settingsId)
|
void TextEditorWidget::setLanguageSettingsId(Id settingsId)
|
||||||
{
|
{
|
||||||
d->m_tabSettingsId = settingsId;
|
d->m_tabSettingsId = settingsId;
|
||||||
|
setCodeStyle(TextEditorSettings::codeStyle(settingsId));
|
||||||
}
|
}
|
||||||
|
|
||||||
Id TextEditorWidget::languageSettingsId() const
|
Id TextEditorWidget::languageSettingsId() const
|
||||||
|
Reference in New Issue
Block a user