1
0
mirror of synced 2025-01-09 13:11:38 +01:00
ImHex/plugins/builtin/include/content/views
paxcut 382a62343d
fix: Fixes for breakpoints (#1923)
WARNING: this PR won't compile unless [PR 132 from pattern language
repository](https://github.com/WerWolv/PatternLanguage/pull/132) is
merged first. Some changes here are shared by at least another PR to
this repository but there should not be any conflicts as the shared
changes are identical.

### Problem description
fix: Editing patterns with breakpoints sets behaves unexpectedly. As a
simple example, set a breakpoint and insert a blank line somewhere
before the breakpoint location. The breakpoint will appear to move but
in reality it hasn't. To see this set another breakpoint elsewhere in
the file and the old one will be displayed where it is really located
at.

The reason for this and many other problems with breakpoints is that
currently ImHex keeps two set of breakpoints in text editor and in
evaluator that are independent of each other, ie, changes to one don't
affect the other. This PR aims at synchronizing the two sets through the
per provider breakpoints that exist in view pattern editor.

### Implementation description

It accomplishes this by making the text editor version of breakpoints
the principal source of vectors and the ones in evaluator the effective
version. The first allows one to modify the text around and at the
breakpoint and notify others that the changes have induced changes in
the breakpoint locations. The effective breakpoints allow the insertion
and deletion of breakpoints.

View pattern editor is where breakpoints are updated. It receives
notifications from text editor about changes and then makes sure the
version in evaluator is updated with those changes. View pattern editor
also manages breakpoint addition and deletion so before making changes
it gets a copy of the current ones from text editor, sets the ones in
evaluator, uses the evaluator functions to add or delete breakpoints and
finally sets the text editor version with the new version.
2024-11-24 12:06:44 +01: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 fix: Fixes for breakpoints (#1923) 2024-11-24 12:06:44 +01: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