Commit 1501825d authored by Nate Graham's avatar Nate Graham 🔩 Committed by Elvis Angelaccio

Fix DolphinMainWindow::viewContainers() to take into account split views

The function was previously assuming that each tab view has exactly one
view container, which is not necessarily accurate; some could have a
split view open.
parent 47a5071f
......@@ -204,9 +204,14 @@ DolphinMainWindow::~DolphinMainWindow()
QVector<DolphinViewContainer*> DolphinMainWindow::viewContainers() const
{
QVector<DolphinViewContainer*> viewContainers;
viewContainers.reserve(m_tabWidget->count());
for (int i = 0; i < m_tabWidget->count(); ++i) {
viewContainers << m_tabWidget->tabPageAt(i)->activeViewContainer();
DolphinTabPage *tabPage = m_tabWidget->tabPageAt(i);
viewContainers << tabPage->primaryViewContainer();
if (tabPage->splitViewEnabled()) {
viewContainers << tabPage->secondaryViewContainer();
}
}
return viewContainers;
}
......
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