This commit is contained in:
2012-04-04 16:16:36 +00:00
parent 9fd12948f4
commit 4d24f93f3a
2 changed files with 29 additions and 9 deletions

View File

@@ -470,9 +470,29 @@ namespace VEPROMS.CSLA.Library
rval = (int)MyDefaultFormat.MyStepSectionLayoutData.PMode;
//return (SectionColumnMode)rval;
}
// if no pmode is defined, i.e. rval = 0, then default to single column
// this is what 16bit ve-proms did.
if (rval == 0) rval = 1;
// if no pmode is defined, i.e. rval = 0, then go up to the procedure level & get
// it's format column.
if (rval == 0)
{
SectionInfo si = _SectionInfo != null? _SectionInfo: SectionInfo.Get(_Section.ItemID);
if (si != null)
{
switch (si.MyProcedure.ProcedureConfig.Format_Columns)
{
case FormatColumns.OneColumn:
return SectionColumnMode.One;
break;
case FormatColumns.TwoColumn:
return SectionColumnMode.Two;
break;
default:
return SectionColumnMode.One;
break;
}
}
else
return SectionColumnMode.One; // 16bit's default if nothing defined
}
return (SectionColumnMode)rval;
}
else