B2022-037 Fix to find unlinked RO’s that have parent/child applicability values, in the step properties RO tab (used to insert RO’s)

This commit is contained in:
John Jenko 2022-03-09 14:14:11 +00:00
parent 7c3514e824
commit 01c72f6ddb

View File

@ -1206,13 +1206,24 @@ namespace VEPROMS.CSLA.Library
if (child.value != null) if (child.value != null)
{ {
string value = child.value.ToUpper().Replace("\\U160?"," "); string value = child.value.ToUpper().Replace("\\U160?"," ");
if (_ValueLookupDictionary.ContainsKey(value)) string key = null;
_ValueLookupDictionary[value].Add(new roChild(child)); if (value.Trim().Length == 0)
continue; // do save anthing with a blank key
// B2022-037 if the RO value contains applicability information, then process it (this will give us the default RO value)
else if (value.Contains("<APL "))
key = FixUnitROs(GetParentChildROValue(child)).ToUpper().Replace("\\U160?", " ");
else
key = value;
rochild chldForDictionary = child;
chldForDictionary.title = key; // B2022-037 the title is used in the popup list on the insert RO panel when seaching for ROs (selecting text in the step editor)
if (_ValueLookupDictionary.ContainsKey(key))
_ValueLookupDictionary[key].Add(new roChild(chldForDictionary)); // B2022-037 save the process RO information
else else
{ {
List<roChild> children = new List<roChild>(); List<roChild> children = new List<roChild>();
children.Add(new roChild(child)); // adding entries to this dictionary for every ro!! // adding entries to this dictionary for every ro!!
_ValueLookupDictionary.Add(value, children); children.Add(new roChild(chldForDictionary)); // B2022-037 save the process RO information
_ValueLookupDictionary.Add(key, children);
} }
} }
} }