public virtual void TriggerAnalysisSelected(AnalysisOccurrence target, bool fSaveGuess, bool fMakeDefaultSelection, bool fShow)
{
// This can happen, though it is rare...see LT-8193.
if (!target.IsValid)
{
return;
}
if (IsFocusBoxInstalled)
FocusBox.UpdateRealFromSandbox(null, fSaveGuess, target);
TryHideFocusBoxAndUninstall();
RecordGuessIfNotKnown(target);
InstallFocusBox();
RootBox.DestroySelection();
FocusBox.SelectOccurrence(target);
SetFocusBoxSizeForVc();
SelectedOccurrence = target;
if (fShow)
{
SimulateReplaceAnalysis(target);
MoveFocusBoxIntoPlace();
// Now it is the right size and place we can show it.
TryShowFocusBox();
// All this CAN hapen because we're editing in another window...for example,
// if we edit something that deletes the current wordform in a concordance view.
// In that case we don't want to steal the focus.
if (ParentForm == Form.ActiveForm)
FocusBox.FocusSandbox();
}
if (fMakeDefaultSelection)
m_mediator.IdleQueue.Add(IdleQueuePriority.Medium, FocusBox.MakeDefaultSelection);
}