diff --git a/DistFiles/Language Explorer/Configuration/Grammar/areaConfiguration.xml b/DistFiles/Language Explorer/Configuration/Grammar/areaConfiguration.xml index 219ac94e8c..a5b11aaa9f 100644 --- a/DistFiles/Language Explorer/Configuration/Grammar/areaConfiguration.xml +++ b/DistFiles/Language Explorer/Configuration/Grammar/areaConfiguration.xml @@ -426,7 +426,11 @@ - + + + + diff --git a/Src/LexText/Morphology/AffixRuleFormulaControl.cs b/Src/LexText/Morphology/AffixRuleFormulaControl.cs index 96d776c50b..e2dba908c2 100644 --- a/Src/LexText/Morphology/AffixRuleFormulaControl.cs +++ b/Src/LexText/Morphology/AffixRuleFormulaControl.cs @@ -841,7 +841,9 @@ public override void SetMappingNaturalClass(SelectionHelper sel = null) var natClasses = new HashSet(); foreach (var nc in m_cache.LangProject.PhonologicalDataOA.NaturalClassesOS) { - if (nc.ClassID == PhNCFeaturesTags.kClassId) + // Rule mappings only allow feature-based, user-defined natural classes + // to be selected. + if (nc is IPhNCFeatures featNC && IsFeatureBasedNCUserDefined(featNC)) natClasses.Add(nc); } var selectedNc = DisplayChooser(MEStrings.ksRuleNCOpt, MEStrings.ksRuleNCChooserLink, diff --git a/Src/LexText/Morphology/AffixRuleFormulaSlice.cs b/Src/LexText/Morphology/AffixRuleFormulaSlice.cs index 8a54d8fa56..8c7f5a872a 100644 --- a/Src/LexText/Morphology/AffixRuleFormulaSlice.cs +++ b/Src/LexText/Morphology/AffixRuleFormulaSlice.cs @@ -62,7 +62,11 @@ public bool OnMappingSetNaturalClass(object args) public bool OnDisplayMappingJumpToNaturalClass(object commandObject, ref XCore.UIItemDisplayProperties display) { CheckDisposed(); - bool enable = AffixRuleFormulaControl.IsNCIndexCurrent; + // Note that a mapping's Natural Class is always feature-based. + // For feature-based NCs, we only want to allow jumping to the NC + // if it is user-defined. + var mapping = AffixRuleFormulaControl.CurrentObject as IMoModifyFromInput; + bool enable = mapping != null && RuleFormulaControl.IsFeatureBasedNCUserDefined(mapping.ModificationRA); display.Enabled = enable; display.Visible = enable; return true; diff --git a/Src/LexText/Morphology/MEStrings.Designer.cs b/Src/LexText/Morphology/MEStrings.Designer.cs index 348735476b..6bd7a70311 100644 --- a/Src/LexText/Morphology/MEStrings.Designer.cs +++ b/Src/LexText/Morphology/MEStrings.Designer.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.42000 @@ -770,11 +770,22 @@ internal static string ksRuleNCFeatsName { return ResourceManager.GetString("ksRuleNCFeatsName", resourceCulture); } } - - /// - /// Looks up a localized string similar to Natural Class. - /// - internal static string ksRuleNCOpt { + + /// + /// Looks up a localized string similar to Shared: {0}. + /// + internal static string ksRuleNCSharedNameFormat + { + get + { + return ResourceManager.GetString("ksRuleNCSharedNameFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Natural Class. + /// + internal static string ksRuleNCOpt { get { return ResourceManager.GetString("ksRuleNCOpt", resourceCulture); } diff --git a/Src/LexText/Morphology/MEStrings.resx b/Src/LexText/Morphology/MEStrings.resx index e0cca24438..72c0a6d309 100644 --- a/Src/LexText/Morphology/MEStrings.resx +++ b/Src/LexText/Morphology/MEStrings.resx @@ -1,4 +1,4 @@ - +