mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-24 23:31:32 +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
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user