PhraseEditor // Implement tagOverrides().

- This affects both PhraseEditorCocoa and PhraseEditorUI.
This commit is contained in:
ShikiSuen 2022-12-08 15:34:59 +08:00
parent 7943ae9992
commit 89d2884ea2
2 changed files with 6 additions and 0 deletions

View File

@ -176,6 +176,9 @@ public struct VwrPhraseEditorUI: View {
DispatchQueue.main.async {
isLoading = true
delegate.consolidate(text: &txtContent, pragma: false) //
if selUserDataType == .thePhrases {
delegate.tagOverrides(in: &txtContent, mode: selInputMode)
}
isLoading = false
isSaved = false
}

View File

@ -172,6 +172,9 @@ extension CtlPrefWindow: NSTextViewDelegate, NSTextFieldDelegate {
DispatchQueue.main.async { [self] in
isLoading = true
vChewingLM.LMConsolidator.consolidate(text: &tfdPETextEditor.string, pragma: false)
if selUserDataType == .thePhrases {
LMMgr.shared.tagOverrides(in: &tfdPETextEditor.string, mode: selInputMode)
}
isLoading = false
isSaved = false
}