diff --git a/PROMS/Formats/fmtall/wst1all.xml b/PROMS/Formats/fmtall/wst1all.xml index 613e7756..3858cfb5 100644 Binary files a/PROMS/Formats/fmtall/wst1all.xml and b/PROMS/Formats/fmtall/wst1all.xml differ diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index 8eb86f8b..6074664a 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -5797,6 +5797,14 @@ namespace VEPROMS.CSLA.Library return LazyLoad(ref _DoSectionTransitions, "@DoSectionTransitions"); } } + private LazyLoad _NoDefaultSectReq; + public bool NoDefaultSectReq + { + get + { + return LazyLoad(ref _NoDefaultSectReq, "@NoDefaultSectReq"); + } + } private LazyLoad _AllowTransitionFromSection; public bool AllowTransitionFromSection { diff --git a/PROMS/Volian.Controls.Library/DisplayTransition.cs b/PROMS/Volian.Controls.Library/DisplayTransition.cs index e8e3ded3..b4574bb9 100644 --- a/PROMS/Volian.Controls.Library/DisplayTransition.cs +++ b/PROMS/Volian.Controls.Library/DisplayTransition.cs @@ -548,6 +548,9 @@ namespace Volian.Controls.Library } private void cbTranProcsFillIn(ItemInfo prcitm) { + ItemInfo curSelProc = null; + if (cbTranProcs.Items.Count > 0) curSelProc = cbTranProcs.SelectedItem as ItemInfo; + if (curSelProc != null && prcitm.ItemID == curSelProc.ItemID) return; cbTranProcs.Items.Clear(); ItemInfo selitm = prcitm; // this is the selected 'procedure' prcitm = prcitm.FirstSibling; @@ -885,7 +888,9 @@ namespace Volian.Controls.Library // 1) Look in ProcedureConfig/SectionStart // 2) Look in SectionConfig/OriginalSteps // 3) Search through the procedure's sections for 'Procedure Steps' as the title - // 4) Display message box telling user to set the default section on section properties/format dialog + // 4) If plant has format flag that procedure doesn't require default sections to be set, and none + // have been, return first in list. + // 5) Display message box telling user to set the default section on section properties/format dialog // (this returns a -1, i.e. error) // 1) Look in ProcedureConfig/SectionStart @@ -937,7 +942,15 @@ namespace Volian.Controls.Library return sit.ItemID; } } - // 4) Display messagebox to tell user to specify which section should be used as the 'default section'. + // 4) Format has flag that a default section is not required so return 1st section. + if (prcitm.Sections != null) + { + foreach (SectionInfo sid in prcitm.Sections) + { + if (sid.IsStepSection && sid.ActiveFormat.PlantFormat.FormatData.TransData.NoDefaultSectReq) return sid.ItemID; + } + } + // 5) Display messagebox to tell user to specify which section should be used as the 'default section'. MessageBox.Show("No default step section was found. Set the appropriate Step Section as the default by using the Section Property Page, Format Tab.", "Transition using Default Step Section in Format", MessageBoxButtons.OK,MessageBoxIcon.Error); return -1; }