Fixed B2013-175: Shortcut for inserting substeps is blank menu

This commit is contained in:
Kathy Ruffing 2015-08-06 15:37:26 +00:00
parent ae7058eb8d
commit dfd6dd4f3a

View File

@ -1275,6 +1275,16 @@ namespace Volian.Controls.Library
btn.Click -= new System.EventHandler(btnInsStep_Click); btn.Click -= new System.EventHandler(btnInsStep_Click);
btn.Click += new System.EventHandler(btnInsStep_Click); btn.Click += new System.EventHandler(btnInsStep_Click);
btn.Tag = string.Format("{0} {1}", fromtype, ichld.MyContent.Type - 20000); btn.Tag = string.Format("{0} {1}", fromtype, ichld.MyContent.Type - 20000);
// B2013-175: add the single substep type to the context menu too
int cmtype = (int)ichld.MyContent.Type - 20000; // content type is the index into the stepdatalist
StepData sdcm = MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[cmtype];
DevComponents.DotNetBar.ButtonItem cmbix = new DevComponents.DotNetBar.ButtonItem("cmbtn" + sdcm.Type, sdcm.Type);
cmbix.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.TextOnlyAlways;
cmbix.Text = sdcm.StepEditData.TypeMenu.MenuItem;
cmbix.Tag = string.Format("{0} {1}", fromtype, sdcm.Index); // index of type to insert it when button is clicked
cmbix.Click += new System.EventHandler(btnInsStep_Click);
cmbtn.SubItems.Add(cmbix);
return; return;
} }
else else