Commit aa180864 authored by Christoph Cullmann's avatar Christoph Cullmann 🍨
Browse files

avoid that KWrite stores/restores view config

the setting is not there in the config dialog by design
the default value was not well choosen
just skip this for KWrite

BUG: 459366
parent bef55e48
Pipeline #257544 failed with stage
in 21 minutes and 48 seconds
......@@ -185,7 +185,7 @@ void KateSessionManager::loadSession(const KateSession::Ptr &session) const
cfg = new KConfig(anonymousSessionFile(), KConfig::SimpleConfig);
}
if (c.readEntry("Restore Window Configuration", true)) {
if (KateApp::isKate() && c.readEntry("Restore Window Configuration", true)) {
int wCount = cfg->group("Open MainWindows").readEntry("Count", 1);
for (int i = 0; i < wCount; ++i) {
......@@ -352,7 +352,7 @@ void KateSessionManager::saveSessionTo(KConfig *sc)
sc->group("Open MainWindows").writeEntry("Count", KateApp::self()->mainWindowsCount());
// save config for all windows around ;)
bool saveWindowConfig = KConfigGroup(KSharedConfig::openConfig(), "General").readEntry("Restore Window Configuration", true);
bool saveWindowConfig = KateApp::isKate() && KConfigGroup(KSharedConfig::openConfig(), "General").readEntry("Restore Window Configuration", true);
for (int i = 0; i < KateApp::self()->mainWindowsCount(); ++i) {
KConfigGroup cg(sc, QStringLiteral("MainWindow%1").arg(i));
// saveProperties() handles saving the "open recent" files list
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment