1
0
mirror of synced 2024-11-14 19:17:42 +01:00
ImHex/plugins/builtin/include/content/views
paxcut 866b956680
feat: Added per provider cursor position for the Pattern editor (#1861)
### Problem description
Currently, the pattern editor does not remember where the cursor is
located in each provider. For example, suppose you have 2 providers in
your project, and you scrolled down to line 200 in the first pattern to
make some changes and remembered that the code you want to insert is in
the second provider. Then you switch to the second provider, look for
the code and find it in line 235. Switch back to the first one, and you
are at the beginning of the file. So you again look for the line to edit
paste it to realize that it needs code a few lines before the place you
found it. You switch to the second provider, and you are at the top
again. This gets annoying very fast.

### Implementation description

This PR ensures that, when you return to the pattern in the editor for
any of the opened providers, the cursor will still be at the same place
it was when you switched to a different one. Each provider pattern saves
its cursor position and returns to it when you switch to that provider.
It does that by creating a PerProvider variable and using it when
providers are first opened to set it to the origin and when switching
providers it first saves the position of the old provider and then loads
and sets the saved position of the new provider.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-09-15 15:28:37 +02:00
..
view_about.hpp impr: Refactor various view drawing code (#1698) 2024-06-08 13:56:48 +02:00
view_achievements.hpp refactor: Streamline entire view system 2023-11-21 13:47:50 +01:00
view_bookmarks.hpp impr: Improve bookmark drag-n-drop logic 2024-06-09 20:11:55 +02:00
view_command_palette.hpp refactor: Get rid of this->m_ 2023-12-19 13:10:25 +01:00
view_constants.hpp refactor: Streamline entire view system 2023-11-21 13:47:50 +01:00
view_data_inspector.hpp impr: Refactor various view drawing code (#1698) 2024-06-08 13:56:48 +02:00
view_data_processor.hpp feat: Display pattern descriptions in file chooser and pattern popup 2024-08-03 22:00:47 +02:00
view_find.hpp feat: Added CSV, TSV and JSON as export options for Find results (#1673) 2024-06-18 20:57:55 +00:00
view_hex_editor.hpp impr: Make highlight hovering more efficient 2024-07-08 21:34:27 +02:00
view_highlight_rules.hpp feat: Added highlighting rules 2023-12-02 11:09:32 +01:00
view_information.hpp feat: Added option to highlight pattern parents in the hex editor when hovering 2024-02-25 14:30:56 +01:00
view_logs.hpp refactor: Streamline entire view system 2023-11-21 13:47:50 +01:00
view_patches.hpp fix: Modification highlighting not working correctly when provider data was moved 2024-02-15 22:09:37 +01:00
view_pattern_data.hpp feat: Highlight patterns in hex editor when hovering over pattern data row 2024-06-07 19:48:10 +02:00
view_pattern_editor.hpp feat: Added per provider cursor position for the Pattern editor (#1861) 2024-09-15 15:28:37 +02:00
view_provider_settings.hpp fix: Provider loader interface being closable and not resizing correctly 2023-12-17 23:15:52 +01:00
view_settings.hpp impr: Use sidebar for settings categories instead of tabs 2024-04-10 19:55:37 +02:00
view_store.hpp fix: Replace old defaults path system with a new one 2024-06-22 10:44:55 +02:00
view_theme_manager.hpp refactor: Streamline entire view system 2023-11-21 13:47:50 +01:00
view_tools.hpp impr: Various web build improvements, API cleanup (#1541) 2024-02-10 23:31:05 +01:00
view_tutorials.hpp feat: Added basic introduction tutorial 2023-12-13 23:03:39 +01:00