fix/SaveLastOpenFilesList() - #692
Conversation
|
looks good, but pls change your indent style from tab to spaces. Also change the inner for to an foreach, the for is not needed |
|
Ok |
|
The indexed loop for DisplayingContents should be kept; it exposes displayed entries through its custom Count and indexer, while foreach uses the inherited ReadOnlyCollection enumerator and does not return the displayed tabs. The prior LINQ implementation had this failure and caused an empty LastOpenFilesList at shutdown. |
Hirogen
left a comment
There was a problem hiding this comment.
As a side note, pls also add to the pr description:
this fixes also 2 other places "Close other tabs" [LogTabWindow.cs:2326] and session-save file list [LogTabWindow.cs:2410], both places are affected by this fix and should now work correctly
|
All should be fixed as required. |
test: cover displayed tabs fix/SaveLastOpenFilesList() 1. SaveLastOpenFilesList() clears LastOpenFilesList. 2. It receives an empty list from GetAllWindowsFromDockPanel(). 3. Nothing is added back. 4. The empty list is saved to settings.json.
0623ace to
5c3d5c9
Compare
Fix for clearing "LastOpenFilesList" on app exit.
When app closes, it looks like it wipes the set of files to restore.
Before exit:

After exit:

Also fixes two other places (both places are affected by this fix and should now work correctly):
LogTabWindow.cs:2326)LogTabWindow.cs:2410)