Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues with history navigation - entries not getting selected correctly, duplicate text in decompiler output #145

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KubeRoot
Copy link

Fixes the following two (related) issues:

  • After selecting entry A, then entry B, going back in history, and reselecting entry B, the decompiler output will now include both the results for A and B concatenated together. The results for A then persist when selecting any other entry, appearing above the decompilation for the actually selected entry.
  • After selecting entry A, then entry B, and going back in history, entry A does not appear to be selected on the list.

This PR changes TreeFlattener to implement IList<object>.
The cause of the issue is the following line in Avalonia: SelectionModel.cs#L36
Specifically, when changing the selection programmatically, the SelectionModel tries to find the indices of any entries added to the selection in the source, to generate the ranges. However, since the source is casted to IEnumerable<object> here, casting the TreeFlattener results in null, causing the SelectionModel to abort updating the selection.'

Might be superseded by:

Looks like an update to Avalonia might fix this issue: ba7e8a2
It seems like the current master branch uses IEnumerable instead of IEnumerable<T>, which should sidestep the problem.

@KubeRoot
Copy link
Author

KubeRoot commented Dec 1, 2023

After getting the Avalonia v11 upgrade to (barely) run and testing, it seems to indeed not have the issue this fixes. I'm gonna leave this open just in case, but probably should be closed in favor of the Avalonia upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant