/// <summary> /// split the current occurrence into occurrences for each word in the phrase-wordform. /// (if it IsPhrase) /// </summary> public void OnBreakPhrase(object arg) { // (LT-8069) in some odd circumstances, the break phrase icon lingers on the tool bar menu when it should // have disappeared. If we're in that state, just return. if (!ShowBreakPhraseIcon) { return; } var cmd = (ICommandUndoRedoText)arg; UndoableUnitOfWorkHelper.Do(cmd.UndoText, cmd.RedoText, Cache.ActionHandlerAccessor, () => SelectedOccurrence.BreakPhrase()); InterlinWordControl.SwitchWord(SelectedOccurrence); UpdateButtonState(); }
/// <summary> /// Note: Assume we are in the OnDisplayShowLinkWords is true context. /// </summary> public bool OnJoinWords(object arg) { var cmd = (ICommandUndoRedoText)arg; UndoableUnitOfWorkHelper.Do(cmd.UndoText, cmd.RedoText, Cache.ActionHandlerAccessor, () => { SelectedOccurrence.MakePhraseWithNextWord(); if (InterlinDoc != null) { InterlinDoc.RecordGuessIfNotKnown(SelectedOccurrence); } }); InterlinWordControl.SwitchWord(SelectedOccurrence); UpdateButtonState(); return(true); }