mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 15:41:34 +08:00
Some changes to ensure emission of focusedDockWidgetChanged signal
This commit is contained in:
parent
ef5b22c616
commit
8cf4134125
@ -160,11 +160,6 @@ void DockFocusControllerPrivate::updateDockWidgetFocus(CDockWidget* DockWidget)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (old == DockWidget)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (DockWidget->isVisible())
|
if (DockWidget->isVisible())
|
||||||
{
|
{
|
||||||
emit DockManager->focusedDockWidgetChanged(old, DockWidget);
|
emit DockManager->focusedDockWidgetChanged(old, DockWidget);
|
||||||
@ -183,12 +178,9 @@ void CDockFocusController::onDockWidgetVisibilityChanged(bool Visible)
|
|||||||
{
|
{
|
||||||
auto Sender = sender();
|
auto Sender = sender();
|
||||||
auto DockWidget = qobject_cast<ads::CDockWidget*>(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)));
|
disconnect(Sender, SIGNAL(visibilityChanged(bool)), this, SLOT(onDockWidgetVisibilityChanged(bool)));
|
||||||
if (DockWidget && Visible)
|
if (DockWidget && Visible)
|
||||||
{
|
{
|
||||||
//qDebug() << "emit d->DockManager->focusedDockWidgetChanged";
|
|
||||||
emit d->DockManager->focusedDockWidgetChanged(d->OldFocusedDockWidget, DockWidget);
|
emit d->DockManager->focusedDockWidgetChanged(d->OldFocusedDockWidget, DockWidget);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user