From 028345091988ae857b3dd4a40170042139714d8b Mon Sep 17 00:00:00 2001 From: Pr0metheus2 Date: Wed, 29 Jul 2026 14:43:29 +0200 Subject: [PATCH] Fix: Open tabs order on next start LogExpert does not remember open tabs order from last instance. When app starts, tabs are restored in different order from last state. --- .../TabControllerService/TabController.cs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) 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 }