From 5ea09e424d0fa18944a379b1d52bc6b00c153ce9 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Mon, 1 Apr 2024 08:44:15 +0300 Subject: [PATCH] TextEditor: Fix initial loading of behavior settings Fixes: QTCREATORBUG-30606 Change-Id: I1b4d8fd47e528d0868969cf883401037c0cfe9ee Reviewed-by: Christian Stenger --- src/plugins/texteditor/texteditorsettings.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/texteditor/texteditorsettings.cpp b/src/plugins/texteditor/texteditorsettings.cpp index 811852b8a84..356ae76fcd1 100644 --- a/src/plugins/texteditor/texteditorsettings.cpp +++ b/src/plugins/texteditor/texteditorsettings.cpp @@ -431,11 +431,13 @@ TextEditorSettings::TextEditorSettings() connect(this, &TextEditorSettings::fontSettingsChanged, this, updateGeneralMessagesFontSettings); updateGeneralMessagesFontSettings(); - connect(this, &TextEditorSettings::behaviorSettingsChanged, - this, [](const BehaviorSettings &bs) { + auto updateBehaviorSettings = [](const BehaviorSettings &bs) { Core::MessageManager::setWheelZoomEnabled(bs.m_scrollWheelZooming); FancyLineEdit::setCamelCaseNavigationEnabled(bs.m_camelCaseNavigation); - }); + }; + connect(this, &TextEditorSettings::behaviorSettingsChanged, + this, updateBehaviorSettings); + updateBehaviorSettings(globalBehaviorSettings()); } TextEditorSettings::~TextEditorSettings()