Commit 34f85cec authored by Carlos Alves's avatar Carlos Alves Committed by Kurt Hindenburg
Browse files

Fix Bookmark all tabs as a folder crash

The list of active sessions needs to be refreshed when a session is
destroyed. It was being refreshed only on creation.

BUG: 432327
FIXED-IN: 21.04
parent ce31d0e2
...@@ -687,6 +687,10 @@ TabbedViewContainer *ViewManager::createContainer() ...@@ -687,6 +687,10 @@ TabbedViewContainer *ViewManager::createContainer()
[this, container]() { [this, container]() {
containerViewsChanged(container); containerViewsChanged(container);
}); });
connect(container, &Konsole::TabbedViewContainer::viewRemoved, this,
[this, container]() {
containerViewsChanged(container);
});
connect(container, &TabbedViewContainer::newViewRequest, connect(container, &TabbedViewContainer::newViewRequest,
this, &ViewManager::newViewRequest); this, &ViewManager::newViewRequest);
......
...@@ -385,6 +385,8 @@ void TabbedViewContainer::viewDestroyed(QObject *view) ...@@ -385,6 +385,8 @@ void TabbedViewContainer::viewDestroyed(QObject *view)
removeTab(idx); removeTab(idx);
forgetView(); forgetView();
_tabIconState.remove(widget); _tabIconState.remove(widget);
Q_EMIT viewRemoved();
} }
void TabbedViewContainer::forgetView() void TabbedViewContainer::forgetView()
......
...@@ -187,6 +187,9 @@ Q_SIGNALS: ...@@ -187,6 +187,9 @@ Q_SIGNALS:
/** Emitted when a view is added to the container. */ /** Emitted when a view is added to the container. */
void viewAdded(TerminalDisplay *view); void viewAdded(TerminalDisplay *view);
/** Emitted when a view is removed from container. */
void viewRemoved();
/** detach the specific tab */ /** detach the specific tab */
void detachTab(int tabIdx); void detachTab(int tabIdx);
......
Markdown is supported
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