diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index 3d122703..d2da2d46 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -195,9 +195,10 @@ namespace Volian.Controls.Library int fromtype = Convert.ToInt32(insdata[0]); int contenttype = Convert.ToInt32(insdata[1]) + 20000; - // if from type == 0, we've inserted a hls, do a after from current HLS - // if not at HLS, go up parents until find it. - if (fromtype == 0) + // if from type == 0, we've inserted a hls. + // if inserting from section, insert first child + // else do a after from current HLS - if not at HLS, go up parents until find it. + if (fromtype == 0 && !_MyStepItem.MyItemInfo.IsStepSection) { StepItem hlsStepItem = _MyStepItem; while (!hlsStepItem.MyItemInfo.IsHigh) @@ -339,12 +340,15 @@ namespace Volian.Controls.Library if (MyItemInfo.IsProcedure || MyItemInfo.IsSection) { btnChgTyp.Enabled = false; - btnInsHLS.Enabled = btnInsCaut.Enabled = btnInsNote.Enabled = btnInsRNO.Enabled = btnInsFig.Enabled = + + btnInsCaut.Enabled = btnInsNote.Enabled = btnInsRNO.Enabled = btnInsFig.Enabled = btnInsTable.Enabled = btnInsSubstep.Enabled = btnInsBefore.Enabled = btnInsAfter.Enabled = false; // if on a procedure or section title, don't allow for insert of ROs or Transitions: // disable buttons. Info panels for ROs and Transitions are made invisible in frmVEPROMS.cs 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 (btnInsHLS.Enabled) GalleryForSubTypes(MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.HLS, MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.HLS, btnInsHLS, (int)E_FromType.Step); this.Refresh(); return; }