From 4fbdb3ad395f0e9ef5299b2e80e160a1269c2119 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 9 Jan 2025 10:50:11 +0100 Subject: [PATCH] TextEditor: fix loading outline cursor synchronization setting The button was set to the correct enabled state, but not the member that holds the information whether the outline should be synchronized with the cursor. Change-Id: I57f96e02dc0a9a954874fefa4926741b389c3783 Reviewed-by: Christian Stenger --- src/plugins/texteditor/outlinefactory.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/texteditor/outlinefactory.cpp b/src/plugins/texteditor/outlinefactory.cpp index e34d50c8b85..ee58f2c050f 100644 --- a/src/plugins/texteditor/outlinefactory.cpp +++ b/src/plugins/texteditor/outlinefactory.cpp @@ -177,7 +177,6 @@ void OutlineWidgetStack::restoreSettings(Utils::QtcSettings *settings, int posit const Key baseKey = numberedKey("Outline.", position) + '.'; const QString baseKeyString = stringFromKey(baseKey); - bool syncWithEditor = true; m_widgetSettings.clear(); const QStringList longKeys = settings->allKeys(); for (const QString &longKey : longKeys) { @@ -187,13 +186,13 @@ void OutlineWidgetStack::restoreSettings(Utils::QtcSettings *settings, int posit const QString key = longKey.mid(baseKeyString.length()); if (key == QLatin1String("SyncWithEditor")) { - syncWithEditor = settings->value(keyFromString(longKey)).toBool(); + m_syncWithEditor = settings->value(keyFromString(longKey)).toBool(); continue; } m_widgetSettings.insert(key, settings->value(keyFromString(longKey))); } - m_toggleSync->setChecked(syncWithEditor); + m_toggleSync->setChecked(m_syncWithEditor); if (auto outlineWidget = qobject_cast(currentWidget())) outlineWidget->restoreSettings(m_widgetSettings); }