Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix view problems when moving around the packet structure
This became an issue again when I introduced packet search. The issue was as follows: - the user navigates in the packet struct view - a position change there causes a callback to update the cursor position in the hex view - this then causes a callback to update the currently expanded struct again, which might result in a tree node being expanded that the user hadn't chosen to expand (The procedure doesn't get stuck in a loop because when the position converges, the callbacks stop.) The fix is to prevent the last step in the callback chain - hex -> struct - if the user is currently focused in the packet struct view, so preserving their position. There is an override for search so that if the views are updated as a result of a search match, both struct and hex views are affected, and in particular, the struct view will expand the innermost matching node.
- Loading branch information