fix: recover Session file list from the tab layout XML (#694) - #695
Merged
Conversation
v1.42.0 saved Sessions (.lxj) with an empty FileNames list: the save path enumerated DockPanelSuite's DisplayingContents with LINQ/foreach, whose enumerator walks an empty backing list (only Count and the indexer expose the displayed tabs). Loading such a Session failed with 'None of the files in this session could be found'. The enumeration itself is already fixed on Development (5c3d5c9), so newly saved Sessions are correct again. This makes the Sessions written by v1.42.0 loadable: the DockPanel layout XML in them still names every log window (PersistString="LogWindow#<path>"), so when a loaded Session has no file list, recover the paths from the layout before resolving and validating.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #694.
v1.42.0 saved Sessions (.lxj) with an empty FileNames list: the save path enumerated DockPanelSuite's DisplayingContents with LINQ, whose enumerator walks an empty backing list (only Count/indexer expose the displayed tabs). Loading such a Session failed with "None of the files in this session could be found". The enumeration itself was already fixed on Development (5c3d5c9), so newly saved Sessions are correct again.
This PR makes the Sessions written by v1.42.0 loadable: the DockPanel layout XML in them still names every log window (PersistString="LogWindow#"), so when a loaded Session has no file list, the paths are recovered from the layout before resolving and validating. Verified against the exact .lxj attached to the issue.