File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -423,6 +423,13 @@ CDockWidget* CDockFocusController::focusedDockWidget() const
423
423
}
424
424
425
425
426
+ // ==========================================================================
427
+ CDockAreaWidget* CDockFocusController::focusedDockArea () const
428
+ {
429
+ return d->FocusedArea .data ();
430
+ }
431
+
432
+
426
433
// ==========================================================================
427
434
void CDockFocusController::setDockWidgetTabPressed (bool Value)
428
435
{
Original file line number Diff line number Diff line change @@ -69,6 +69,12 @@ private Q_SLOTS:
69
69
*/
70
70
CDockWidget* focusedDockWidget () const ;
71
71
72
+ /* *
73
+ * Returns the dock area that contains the focusedDockWidget() or nullptr if
74
+ * the focused dock widget is not in this area.
75
+ */
76
+ CDockAreaWidget* focusedDockArea () const ;
77
+
72
78
/* *
73
79
* Request focus highlighting for the given dock widget assigned to the tab
74
80
* given in Tab parameter
Original file line number Diff line number Diff line change @@ -599,9 +599,9 @@ void CDockWidgetTab::setActiveTab(bool active)
599
599
if (CDockManager::testConfigFlag (CDockManager::FocusHighlighting) && !d->DockWidget ->dockManager ()->isRestoringState ())
600
600
{
601
601
bool UpdateFocusStyle = false ;
602
- if (active && ! hasFocus ())
603
- {
604
- // setFocus(Qt::OtherFocusReason);
602
+ // Update the focus only, if this the dock area of this tab is the focused dock area
603
+ if (active && ! hasFocus () && (d-> focusController ()-> focusedDockArea () == this -> dockAreaWidget ()))
604
+ {
605
605
d->focusController ()->setDockWidgetTabFocused (this );
606
606
UpdateFocusStyle = true ;
607
607
}
You can’t perform that action at this time.
0 commit comments