Commit 71f4c682 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix multiple bins should always stay tabbed together.

Related to #1290
parent fbe72601
......@@ -215,6 +215,7 @@ bool LayoutManagement::loadLayout(const QString &layoutId, bool selectButton)
}
pCore->window()->centralWidget()->setHidden(!timelineVisible);
pCore->window()->restoreState(state);
pCore->window()->tabifyBins();
if (selectButton) {
// Activate layout button
QList<QAbstractButton *>buttons = m_containerGrp->buttons();
......
......@@ -4607,6 +4607,16 @@ void MainWindow::addBin(Bin *bin, const QString &binName)
m_binWidgets << bin;
}
void MainWindow::tabifyBins()
{
QList<QDockWidget *> docks = findChildren<QDockWidget *>();
for (auto dock : qAsConst(docks)) {
if (dock->objectName().startsWith(QLatin1String("project_bin_"))) {
tabifyDockWidget(m_projectBinDock, dock);
}
}
}
Bin *MainWindow::getBin()
{
if (m_binWidgets.isEmpty()) {
......
......@@ -140,6 +140,8 @@ public:
Bin *getBin();
/** @brief Get the active (focused) bin or first one if none is active*/
Bin *activeBin();
/** @brief Ensure all bin widgets are tabbed together*/
void tabifyBins();
int binCount() const;
/** @brief Hide subtitle track */
......
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