Commit 4011ec9e authored by Christoph Cullmann's avatar Christoph Cullmann 🍨
Browse files

avoid all session restore/save work for KWrite

will avoid focus stealing issues, too


(cherry picked from commit 81648e41)
parent 52119ab8
Pipeline #268977 passed with stage
in 23 minutes and 39 seconds
......@@ -1530,6 +1530,13 @@ void MainWindow::startRestore(KConfigBase *config, const QString &group)
KConfigGroup cg(m_restoreConfig, m_restoreGroup);
KWindowConfig::restoreWindowSize(windowHandle(), cg);
// KWrite uses no sidebars, avoid all work beside windows sizes restoring above
if (KateApp::isKWrite()) {
m_restoreConfig = nullptr;
m_restoreGroup.clear();
return;
}
// restore the sidebars
for (auto &sidebar : qAsConst(m_sidebars)) {
sidebar->startRestoreSession(cg);
......@@ -1591,6 +1598,11 @@ void MainWindow::saveSession(KConfigGroup &config)
{
saveMainWindowSettings(config);
// KWrite uses no sidebars, avoid all work beside windows sizes saving
if (KateApp::isKWrite()) {
return;
}
// save main splitter sizes ;)
config.writeEntry("Kate-MDI-H-Splitter", m_hSplitter->sizes());
config.writeEntry("Kate-MDI-V-Splitter", m_vSplitter->sizes());
......
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