diff --git a/src/LogExpert.UI/Services/TabControllerService/TabController.cs b/src/LogExpert.UI/Services/TabControllerService/TabController.cs
index 8e7c6f15e..2e4f12938 100644
--- a/src/LogExpert.UI/Services/TabControllerService/TabController.cs
+++ b/src/LogExpert.UI/Services/TabControllerService/TabController.cs
@@ -458,15 +458,16 @@ protected virtual void Dispose (bool disposing)
/// Gets all LogWindow instances from the DockPanel's Contents collection.
///
/// Read-only list of all LogWindows in the DockPanel
- public IReadOnlyList GetAllWindowsFromDockPanel ()
- {
- return !_initialized || _dockPanel == null
- ? []
- : (IReadOnlyList)_dockPanel.Contents
- .OfType()
- .ToList()
- .AsReadOnly();
- }
+ public IReadOnlyList GetAllWindowsFromDockPanel ()
+ {
+ return !_initialized || _dockPanel == null
+ ? []
+ : _dockPanel.Panes
+ .Where(pane => pane.DockState == DockState.Document)
+ .SelectMany(pane => pane.Contents.OfType())
+ .ToList()
+ .AsReadOnly();
+ }
#endregion
}