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
2014-09-15 21:10:27 +00:00
parent be08172cf8
commit 033b3514f8
2 changed files with 83 additions and 10 deletions

View File

@@ -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;
}