forked from qt-creator/qt-creator
ClangFormat: Fix preview updating
Fixed the behavior when the preview does not update when the Override checkbox was not enabled initially. Currently, the preview is updating when Override the checkbox is enabled. Fixes: QTCREATORBUG-29043 Change-Id: I8a2a6f3cd5890b66d4bffd0c84aeafb5a29fba48 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -215,9 +215,10 @@ bool getCurrentOverriddenSettings(const Utils::FilePath &filePath)
|
||||
const ProjectExplorer::Project *project = ProjectExplorer::SessionManager::projectForFile(
|
||||
filePath);
|
||||
|
||||
return getProjectUseGlobalSettings(project)
|
||||
? ClangFormatSettings::instance().overrideDefaultFile()
|
||||
: getProjectOverriddenSettings(project);
|
||||
return getProjectUseGlobalSettings(project) ? !TextEditor::TextEditorSettings::codeStyle("Cpp")
|
||||
->currentPreferences()
|
||||
->isTemporarilyReadOnly()
|
||||
: getProjectOverriddenSettings(project);
|
||||
}
|
||||
|
||||
ClangFormatSettings::Mode getProjectIndentationOrFormattingSettings(
|
||||
|
||||
Reference in New Issue
Block a user