Add global widget switch history on seek change - #3623
Conversation
This adds a global widget switch history tracked inside MainWindow. When the user seeks backward/forward using the Rizin seek history, MainWindow will attempt to restore the widget type that was active at that history state. A new preference checkbox is added under Preferences -> Interface -> Navigation to enable/disable this feature.
|
Hi @PremadeS could you pls let me know if this pr needs any changes or it is good to merge |
PremadeS
left a comment
There was a problem hiding this comment.
Haven't check out the code thoroughly yet but just from inital testing there seems to be a slight misjudgement on when to change memory widget when Undoing and Redoing
See this for example:
Initially there is no seek history.
Double clicked on __libc_start_main in graph widget, since there is no graph for it, It auto switches to hexdump widget. But seeking back/undoing shows 0x000020ef in hexdump widget even though it should've been shown in graph because that's where the initial click happened. Seeking forward/redoing correctly shows it in graph widget but seeking back again shows it in hexdump widget making Undo and Redo widget switches inconsistent
0bdc451 to
b6ac3c9
Compare
Hi @PremadeS I have done the changes pls let me know if this pr needs any changes or if it is good to merge |
PremadeS
left a comment
There was a problem hiding this comment.
Switching between widgets overrides current seek to that widget. From the code it seems intentional but it would be better if the widget changing history was linear in my opinion.
Example:
0- Initially the seek is at "address0" in graph widget without doing anything
1- Seek to "address1" in graph widget
2- Switch to hexdump widget
3- Seek to "address2" in hexdump widget
4- Seek to disassembly widget
5- Seek to "address3" in disassembly widget
Now undoing all seeks does the following:
1- Shows "address2" in disassembly widget
2- Shows "address1" in hexdump widget
3- Shows "address0" in graph widget
should-save-widget.mp4
meaning it overrides the seek when the widget is changed to that specific widget.
It would be better to have another entry for that widget, meaning if user is at "address1" in graph widget and switches to hexdump and seeks to "address2" then undoing should do the following:
1- First undo: shows "address1" in hexdump
2- Second undo: shows "address1" in graph widget
3- Third undo shows "address0" in graph widget
TL;DR: widget switches should also be saved alongside seeks
Thanks for the suggestion @PremadeS will work on it and will revert |
e3dcacf to
534ed07
Compare
|
Hi Sorry I pushed the commit of another pr will revert the changes and work on the issue |
No worries |
534ed07 to
9260fa1
Compare
|
Hi @PremadeS I have done the changes pls let me know if the pr needs any changes or if it is good to merge |

Your checklist for this pull request
Detailed description
This adds a global widget switch history tracked inside MainWindow. When the user seeks backward/forward using the Rizin seek history, MainWindow will attempt to restore the widget type that was active at that history state. A new preference checkbox is added under Preferences -> Interface -> Navigation to enable/disable this feature.
Test plan (required)
Closing issues
Closes:#3605