Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
bb5c0389
Commit
bb5c0389
authored
Sep 18, 2022
by
Christoph Cullmann
🍨
Committed by
Eric Armbruster
Sep 19, 2022
Browse files
ensure we create views for current tab after close
this can be lost because of the view creation blocking
parent
4abbd6dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
apps/lib/kateviewmanager.cpp
View file @
bb5c0389
...
...
@@ -427,26 +427,20 @@ void KateViewManager::documentsDeleted(const QList<KTextEditor::Document *> &)
m_blockViewCreationAndActivation
=
false
;
/**
* if we have some active view, show them in all viewspaces that got empty!
* ensure we don't end up with empty tabs in some view spaces
* we did block view creation, re-trigger it
*/
if
(
KTextEditor
::
View
*
const
newActiveView
=
activeView
())
{
/**
* check if we have any empty viewspaces and give them a view
*/
for
(
KateViewSpace
*
vs
:
m_viewSpaceList
)
{
if
(
!
vs
->
currentView
())
{
createView
(
newActiveView
->
document
(),
vs
);
}
}
/**
* reactivate will ensure we really merge up the GUI again
* this might be missed as above we had m_blockViewCreationAndActivation set to true
* see bug 426605, no view XMLGUI stuff merged after tab close
*/
reactivateActiveView
();
for
(
auto
vs
:
m_viewSpaceList
)
{
vs
->
ensureViewForCurrentTab
();
}
/**
* reactivate will ensure we really merge up the GUI again
* this might be missed as above we had m_blockViewCreationAndActivation set to true
* see bug 426605, no view XMLGUI stuff merged after tab close
*/
reactivateActiveView
();
// trigger action update
updateViewSpaceActions
();
...
...
apps/lib/kateviewspace.h
View file @
bb5c0389
...
...
@@ -194,6 +194,13 @@ public:
void
focusNavigationBar
();
// ensure we have a view for the current document tab, e.g. after document closing
void
ensureViewForCurrentTab
()
{
// just trigger change view, will do the needful
changeView
(
m_tabBar
->
currentIndex
());
}
protected:
// DND
void
dragEnterEvent
(
QDragEnterEvent
*
e
)
override
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment