Commit f5eab8be authored by Waqar Ahmed's avatar Waqar Ahmed Committed by Christoph Cullmann
Browse files

Remove empty viewspaces after restoring config

- Open anon session
- Create two viewspaces with views in both
- Close Kate
- Restart Kate
- Kate opens with 2 viewspaces but one is empty
parent 4a834072
Pipeline #252474 passed with stage
in 7 minutes and 14 seconds
......@@ -1422,6 +1422,15 @@ void KateViewManager::restoreViewConfiguration(const KConfigGroup &config)
addWidget(vs);
vs->setActive(true);
m_viewSpaceList.push_back(vs);
} else {
// remove any empty viewspaces
// use a copy, m_viewSpaceList wil be modified
const auto copy = m_viewSpaceList;
for (auto *vs : copy) {
if (vs->documentList().isEmpty()) {
onViewSpaceEmptied(vs);
}
}
}
updateViewSpaceActions();
......
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