mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
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.
This commit is contained in:
parent
47a5071fc9
commit
1501825d44
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue