Some changes for debugging visibility changed stuff

This commit is contained in:
Uwe Kindler
2020-01-15 07:49:22 +01:00
parent 03bd4a4505
commit 29ebc83b35
2 changed files with 10 additions and 14 deletions

View File

@@ -546,17 +546,19 @@ void CDockAreaWidget::internalSetCurrentDockWidget(CDockWidget* DockWidget)
void CDockAreaWidget::setCurrentIndex(int index)
{
auto TabBar = d->tabBar();
/*if (TabBar->currentIndex() == index)
{
return;
}*/
if (index < 0 || index > (TabBar->count() - 1))
{
qWarning() << Q_FUNC_INFO << "Invalid index" << index;
return;
}
auto cw = d->ContentsLayout->currentWidget();
auto nw = d->ContentsLayout->widget(index);
if (cw == nw && !nw->isHidden())
{
return;
}
emit currentChanging(index);
TabBar->setCurrentIndex(index);
d->ContentsLayout->setCurrentIndex(index);