Skip to content

Commit

Permalink
LT-21776: Allow newly added vernacular writing systems to be analyzed (
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeOliver28 authored May 8, 2024
1 parent 540ff24 commit d64b3b2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Src/LexText/Interlinear/ITextDll.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@
<SubType>Code</SubType>
</Compile>
<Compile Include="BIRDInterlinearImporter.cs" />
<Compile Include="ChooseAnalysisHander.cs">
<Compile Include="ChooseAnalysisHandler.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ChooseTextWritingSystemDlg.cs">
Expand Down
7 changes: 3 additions & 4 deletions Src/LexText/Interlinear/InterlinVc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ public class InterlinVc : FwBaseVc, IDisposable
private InterlinLineChoices m_lineChoices;
protected IVwStylesheet m_stylesheet;
private IParaDataLoader m_loader;
private readonly HashSet<int> m_vernWss; // all vernacular writing systems
private readonly int m_selfFlid;

private int m_leftPadding;
Expand Down Expand Up @@ -184,8 +183,7 @@ public InterlinVc(LcmCache cache) : base(cache.DefaultAnalWs)
m_tssEmptyPara = TsStringUtils.MakeString(ITextStrings.ksEmptyPara, m_wsAnalysis);
m_tssSpace = TsStringUtils.MakeString(" ", m_wsAnalysis);
m_msaVc = new MoMorphSynAnalysisUi.MsaVc(m_cache);
m_vernWss = WritingSystemServices.GetAllWritingSystems(m_cache, "all vernacular",
null, 0, 0);

// This usually gets overridden, but ensures default behavior if not.
m_lineChoices = InterlinLineChoices.DefaultChoices(m_cache.LangProject,
WritingSystemServices.kwsVernInParagraph, WritingSystemServices.kwsAnal);
Expand Down Expand Up @@ -227,7 +225,8 @@ protected virtual void GetSegmentLevelTags(LcmCache cache)
/// </summary>
internal bool CanBeAnalyzed(AnalysisOccurrence occurrence)
{
return !(occurrence.Analysis is IPunctuationForm) && m_vernWss.Contains(occurrence.BaselineWs);
return !(occurrence.Analysis is IPunctuationForm) &&
WritingSystemServices.GetAllWritingSystems(m_cache, "all vernacular", null, 0, 0).Contains(occurrence.BaselineWs);
}

internal IVwStylesheet StyleSheet
Expand Down

0 comments on commit d64b3b2

Please sign in to comment.