Fixed #527 - updateDockWidgetFocusStyle() function error

This commit is contained in:
Uwe Kindler
2023-06-23 21:06:52 +02:00
parent 36cdf4a252
commit 34cc91a9af
4 changed files with 30 additions and 2 deletions

View File

@@ -49,6 +49,7 @@ struct DockFocusControllerPrivate
#endif
CDockManager* DockManager;
bool ForceFocusChangedSignal = false;
bool TabPressed = false;
/**
* Private data constructor
@@ -267,7 +268,9 @@ void CDockFocusController::onApplicationFocusChanged(QWidget* focusedOld, QWidge
{
Q_UNUSED(focusedOld);
if (d->DockManager->isRestoringState())
// Ignore focus changes if we are restoring state, or if user clicked
// a tab wich in turn caused the focus change
if (d->DockManager->isRestoringState() || d->TabPressed)
{
return;
}
@@ -418,6 +421,12 @@ CDockWidget* CDockFocusController::focusedDockWidget() const
return d->FocusedDockWidget.data();
}
//==========================================================================
void CDockFocusController::setDockWidgetTabPressed(bool Value)
{
d->TabPressed = Value;
}
} // namespace ads
//---------------------------------------------------------------------------