TextEditor: Fix initial loading of behavior settings

Fixes: QTCREATORBUG-30606
Change-Id: I1b4d8fd47e528d0868969cf883401037c0cfe9ee
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Orgad Shaneh
2024-04-01 08:44:15 +03:00
committed by Orgad Shaneh
parent 1d28b90037
commit 5ea09e424d

View File

@@ -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()