Some changes to ensure emission of focusedDockWidgetChanged signal

This commit is contained in:
Uwe Kindler 2020-07-06 08:22:48 +02:00
parent ef5b22c616
commit 8cf4134125

View File

@ -160,11 +160,6 @@ void DockFocusControllerPrivate::updateDockWidgetFocus(CDockWidget* DockWidget)
}
#endif
if (old == DockWidget)
{
return;
}
if (DockWidget->isVisible())
{
emit DockManager->focusedDockWidgetChanged(old, DockWidget);
@ -183,12 +178,9 @@ void CDockFocusController::onDockWidgetVisibilityChanged(bool Visible)
{
auto Sender = sender();
auto DockWidget = qobject_cast<ads::CDockWidget*>(Sender);
/*qDebug() << "sender: " << Sender->metaObject()->className();
qDebug() << "onDockWidgetVisibilityChanged " << Sender->objectName() << " Visible " << Visible;*/
disconnect(Sender, SIGNAL(visibilityChanged(bool)), this, SLOT(onDockWidgetVisibilityChanged(bool)));
if (DockWidget && Visible)
{
//qDebug() << "emit d->DockManager->focusedDockWidgetChanged";
emit d->DockManager->focusedDockWidgetChanged(d->OldFocusedDockWidget, DockWidget);
}
}