Commit 52722e58 authored by Dominik Haumann's avatar Dominik Haumann
Browse files

Correctly restore view config of all split views

BUG: 353852
REVIEW: 128163
parent e3592f53
......@@ -429,10 +429,10 @@ void KateViewManager::documentSavedOrUploaded(KTextEditor::Document *doc, bool)
}
}
bool KateViewManager::createView(KTextEditor::Document *doc, KateViewSpace *vs)
KTextEditor::View *KateViewManager::createView(KTextEditor::Document *doc, KateViewSpace *vs)
{
if (m_blockViewCreationAndActivation) {
return false;
return nullptr;
}
// create doc
......@@ -468,7 +468,7 @@ bool KateViewManager::createView(KTextEditor::Document *doc, KateViewSpace *vs)
activateView(view);
}
return true;
return view;
}
bool KateViewManager::deleteView(KTextEditor::View *view)
......
......@@ -113,9 +113,10 @@ Q_SIGNALS:
public:
/**
* create and activate a new view for doc, if doc == 0, then
* create a new document
* create a new document.
* Can return NULL.
*/
bool createView(KTextEditor::Document *doc = 0L, KateViewSpace *vs = nullptr);
KTextEditor::View *createView(KTextEditor::Document *doc = 0L, KateViewSpace *vs = nullptr);
private:
bool deleteView(KTextEditor::View *view);
......
......@@ -651,9 +651,10 @@ void KateViewSpace::restoreConfig(KateViewManager *viewMan, const KConfigBase *c
QString vgroup = QString::fromLatin1("%1 %2").arg(groupname).arg(fn);
KConfigGroup configGroup(config, vgroup);
viewMan->createView(doc, this);
viewMan->activeView()->readSessionConfig(configGroup);
auto view = viewMan->createView(doc, this);
if (view) {
view->readSessionConfig(configGroup);
}
}
}
......
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