From d12adf6ace2bdf36719e0abd8459c091900915db Mon Sep 17 00:00:00 2001 From: Kathy Date: Fri, 27 Jan 2012 12:44:11 +0000 Subject: [PATCH] --- PROMS/Volian.Controls.Library/StepTabRibbon.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) 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();