Added some error handling to keep from crashing

Added code to support Opposite Unit replace words with and without ROs.
Added logic to limit UpcaseAllRoUnits to only work for setpoints.
This commit is contained in:
Rich committed 2014-09-15 21:10:27 +00:00
1 parent be08172cf8
commit 033b3514f8
2 files changed
+83 -10

No files matched your search

@@ -3637,12 +3637,15 @@ namespace VEPROMS.CSLA.Library
if (_TemplateColumnMode == null)
{
ItemInfo pi = ActiveParent as ItemInfo;
if (!pi.IsStep) // only steps are in template
_TemplateColumnMode = -1;
else if (pi.FormatStepData.UseOldTemplate)
_TemplateColumnMode = pi.TemplateChildColumnMode;
else
_TemplateColumnMode = pi.TemplateColumnMode; // go up parents until find of columnmode or section
if (pi != null)
{
if (!pi.IsStep) // only steps are in template
_TemplateColumnMode = -1;
else if (pi.FormatStepData.UseOldTemplate)
_TemplateColumnMode = pi.TemplateChildColumnMode;
else
_TemplateColumnMode = pi.TemplateColumnMode; // go up parents until find of columnmode or section
}
}
return _TemplateColumnMode ?? -1;
}