Commit 21dc935d authored by Christoph Cullmann's avatar Christoph Cullmann 🍨
Browse files

don't enforce view creation in all windows

this allows that you can create a new window that doesn't contain
the same views as the current one

this should be one first step to allow e.g. proper tab
deactivation, then one would just get a new window per open
action per default
parent aed760f2
......@@ -60,8 +60,6 @@ KateViewManager::KateViewManager(QWidget *parentW, KateMainWindow *parent)
connect(this, &KateViewManager::viewChanged, this, &KateViewManager::slotViewChanged);
connect(KateApp::self()->documentManager(), &KateDocManager::documentCreatedViewManager, this, &KateViewManager::documentCreated);
* before document is really deleted: cleanup all views!
......@@ -74,25 +72,6 @@ KateViewManager::KateViewManager(QWidget *parentW, KateMainWindow *parent)
connect(KateApp::self()->documentManager(), &KateDocManager::aboutToDeleteDocuments, this, &KateViewManager::aboutToDeleteDocuments);
connect(KateApp::self()->documentManager(), &KateDocManager::documentsDeleted, this, &KateViewManager::documentsDeleted);
// Do it on next event loop iteration *after* the viewspace
// config has been read. This avoids
// - useless work (because current ViewSpace is destroyed when we restore config)
// - creates views for stashed docs correctly.
QTimer::singleShot(0, this, [this] {
// register all already existing documents
m_blockViewCreationAndActivation = true;
const auto &docs = KateApp::self()->documentManager()->documentList();
for (KTextEditor::Document *doc : docs) {
m_blockViewCreationAndActivation = false;
// update actions once
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