diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index 00128a1e..20d54211 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -672,6 +672,17 @@ namespace Volian.Controls.Library btnInsTrans.Enabled = btnCMTransition.Enabled = btnInsRO.Enabled = btnCMRO.Enabled = false; btnInsAftH.Enabled = btnInsBefH.Enabled = false; btnInsHLS.Enabled = (!MyItemInfo.IsStepSection) ? false : true; // allow hls from step section + // if active item is a section and format has metasections, check that a hls can be added. + if (MyItemInfo.IsStepSection) + { + if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseMetaSections) + // The 'editable' data config must be set to allow new steps to be created. + { + SectionConfig sc = MyItemInfo.MyConfig as SectionConfig; + if (sc != null && MyItemInfo.Sections != null && MyItemInfo.Sections.Count > 0 && sc.SubSection_Edit != "Y") + btnInsHLS.Enabled = false; + } + } if (btnInsHLS.Enabled) { btnInsHLS.SubItems.Clear();