Remove more unneeded tab widget code

This commit is contained in:
Sergio Martins
2022-08-14 18:47:59 +01:00
parent 7f072366ed
commit 6a9988e7b0
3 changed files with 2 additions and 18 deletions

View File

@@ -28,16 +28,8 @@ Stack_qtquick::Stack_qtquick(Controllers::Stack *controller, QQuickItem *parent)
, StackViewInterface(controller)
, m_dockWidgetModel(new DockWidgetModel(this))
{
connect(m_dockWidgetModel, &DockWidgetModel::countChanged, this, [this] {
Controllers::DockWidget *currentDw = m_dockWidgetModel->currentDockWidget();
if (currentDw && m_dockWidgetModel->indexOf(currentDw) == -1) {
// The current dock widget was removed, set the first one as current
if (m_stack->numDockWidgets() > 0)
m_dockWidgetModel->setCurrentIndex(0);
}
Q_EMIT m_stack->tabBar()->countChanged();
});
connect(m_dockWidgetModel, &DockWidgetModel::countChanged, this,
[this] { Q_EMIT m_stack->tabBar()->countChanged(); });
}
void Stack_qtquick::init()