This commit is contained in:
Kathy Ruffing 2009-11-20 12:49:00 +00:00
parent 655ec1ab94
commit fefc5f3ec2

View File

@ -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;
}