Bug fix B2015-194 Fixed issue where getting the default column mode was gotten correctly, causing the wrong column mode to be used.

This commit is contained in:
John Jenko 2015-11-04 16:05:23 +00:00
parent 7375932a09
commit 1b0814d4ea

View File

@ -270,11 +270,18 @@ namespace VEPROMS.CSLA.Library
if (s == string.Empty)
s = _Xp.ParentValue("Format", "Columns"); // get the parent value
// If there is no parent value, then use the volian default
// Bug fix B2015-194
// -Get columns from the proceudre format if available
// else get from the parent's format if available
// else default to two column
if (s == string.Empty || s == "t") // fnp aop1 had this (not sure about other fnp data)
{
if (DefaultFormat != null)
return (FormatColumns) (DefaultFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColumnMode??
(int)FormatColumns.TwoColumn);// At the procedure level, default to Two column
if (_ProcedureInfo != null && _ProcedureInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColumnMode != null) //This is the procedure format
return (FormatColumns)_ProcedureInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColumnMode;
else if (DefaultFormat != null && DefaultFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColumnMode != null) //This is the parent format
return (FormatColumns)DefaultFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColumnMode;
else
return FormatColumns.TwoColumn; //default to two column
}
return (FormatColumns)int.Parse(s);