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

ensure we disable KTextEditor::View stuff if we have none

e.g. otherwise, the actions of the last view stay merged
even if you have some widget active

that is very strange
parent d9404aac
Pipeline #235045 passed with stage
in 4 minutes and 34 seconds
......@@ -710,6 +710,11 @@ void KateViewManager::reactivateActiveView()
void KateViewManager::activateView(KTextEditor::View *view)
{
if (!view) {
if (m_guiMergedView) {
mainWindow()->guiFactory()->removeClient(m_guiMergedView);
m_guiMergedView = nullptr;
}
Q_EMIT viewChanged(nullptr);
return;
}
......@@ -765,8 +770,9 @@ void KateViewManager::activateView(KTextEditor::View *view)
KTextEditor::View *KateViewManager::activateView(KTextEditor::Document *d)
{
// no doc with this id found
// ensure we disable the current active view if we have none
if (!d) {
activateView(static_cast<KTextEditor::View *>(nullptr));
return activeView();
}
......
......@@ -452,6 +452,7 @@ void KateViewSpace::changeView(int idx)
return;
}
stack->setCurrentWidget(w);
m_viewManager->activateView(static_cast<KTextEditor::Document *>(nullptr));
Q_EMIT m_viewManager->mainWindow()->widgetActivated(w);
return;
}
......
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