Commit 5dac26e2 authored by Christoph Cullmann's avatar Christoph Cullmann 🍨
Browse files

skip only store/save of view manager internals for KWrite

BUG: 459366
BUG: 461355
parent 353bccf6
Pipeline #260768 passed with stage
in 7 minutes and 49 seconds
......@@ -1370,8 +1370,11 @@ void KateViewManager::saveViewConfiguration(KConfigGroup &config)
// strange) and config somehow has previous value set
config.writeEntry("Active ViewSpace", 0);
m_splitterIndex = 0;
saveSplitterConfig(this, config.config(), config.name());
// avoid we save stuff for KWrite mode, see bug 461355 and bug 459366
if (KateApp::isKate()) {
m_splitterIndex = 0;
saveSplitterConfig(this, config.config(), config.name());
}
}
void KateViewManager::restoreViewConfiguration(const KConfigGroup &config)
......@@ -1407,7 +1410,10 @@ void KateViewManager::restoreViewConfiguration(const KConfigGroup &config)
m_minAge = 0;
// start recursion for the root splitter (Splitter 0)
restoreSplitter(config.config(), config.name() + QStringLiteral("-Splitter 0"), this, config.name());
// avoid we restore stuff for KWrite mode, see bug 461355 and bug 459366
if (KateApp::isKate()) {
restoreSplitter(config.config(), config.name() + QStringLiteral("-Splitter 0"), this, config.name());
}
// finally, make the correct view from the last session active
size_t lastViewSpace = config.readEntry("Active ViewSpace", 0);
......@@ -1422,7 +1428,7 @@ void KateViewManager::restoreViewConfiguration(const KConfigGroup &config)
m_viewSpaceList.at(lastViewSpace)->setFocus();
}
// emergency
// emergency or KWrite
if (m_viewSpaceList.empty()) {
// kill bad children
while (count()) {
......
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