Binary edit: forced flag support, dirty-state tracking, and UX polish#11498
Merged
Conversation
added 7 commits
June 8, 2026 19:14
…orced menu items - Add IOcrSubtitle.GetIsForced(int) and implement in all 13 OcrSubtitle classes; BluRay .sup, MKV BluRay, VobSub, IBinaryParagraph, BdnXml and TransportStream return the real flag from their underlying data sources - Expose OcrSubtitleItem.IsForced delegating to the source - BinarySubtitleItem constructor now reads IsForced from the OcrSubtitleItem instead of hard-coding false, so forced flags survive load → edit → export - Add SelectForcedLines and SelectNonForcedLines relay commands to BinaryEditViewModel; wire them as always-visible context menu items in BinaryEditWindow after Toggle Forced - Add SelectForcedLines / SelectNonForcedLines language strings
…rompt Track modifications via CollectionChanged and PropertyChanged subscriptions (catches direct timing edits via TwoWay bindings, inserts, deletes, and all bulk operations). Successful export resets dirty state. Closing with unexported changes shows a Yes/No confirmation dialog.
Uses the source file's stem and directory as the suggested export filename, falling back to stem + "_export" when re-exporting to the same format would collide with the source file.
Without this, items removed from Subtitles (e.g. on reload via Clear) retained a live delegate reference in the ViewModel, preventing GC.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds full forced-flag support to the binary subtitle editor, along with several UX improvements and fixes.
Forced flags
IsForcedfrom the source file when loading binary subtitles (BluRay, BDN, VobSub, transport stream, MKV, DVB, etc.)Dirty-state tracking & close guard
CollectionChanged/PropertyChangedsubscriptionsExport default filename
"export"placeholder_exportto avoid accidentally overwriting the source when extension would collideOther UX / fixes