diff --git a/src/lib/sidebar/sidebar.cpp b/src/lib/sidebar/sidebar.cpp index 4e1a991ef..5b2fa1850 100644 --- a/src/lib/sidebar/sidebar.cpp +++ b/src/lib/sidebar/sidebar.cpp @@ -166,6 +166,10 @@ void SideBarManager::showSideBar(const QString &id, bool toggle) if (!m_sideBar) { m_sideBar = m_window->addSideBar(); + connect(m_sideBar, &QObject::destroyed, this, [this]() { + m_activeBar.clear(); + m_window->saveSideBarSettings(); + }); } if (id == m_activeBar) {