feat: prefer visible/selected channels when joining (#5850)

This commit is contained in:
nerix
2025-01-24 12:43:30 +01:00
committed by GitHub
parent f4ff62f908
commit 35b15c4088
4 changed files with 48 additions and 13 deletions
+20
View File
@@ -595,6 +595,26 @@ void WindowManager::toggleAllOverlayInertia()
}
}
std::set<QString> WindowManager::getVisibleChannelNames() const
{
std::set<QString> visible;
for (auto *window : this->windows_)
{
auto *page = window->getNotebook().getSelectedPage();
if (!page)
{
continue;
}
for (auto *split : page->getSplits())
{
visible.emplace(split->getChannel()->getName());
}
}
return visible;
}
void WindowManager::encodeTab(SplitContainer *tab, bool isSelected,
QJsonObject &obj)
{